Defining wizards for recorders and clients

You can define wizards for recorders and clients.

The New Recording Session wizard runs in the following sequence:

  1. The recording session file is selected.
  2. The client is selected.
  3. The recording method is selected.
  4. The client wizard pages are displayed.
  5. The recorder wizard pages are displayed.

Steps 4 and 5 can be combined in into a single step. Steps 4 and 5 are extension contributions.

Declare a wizard for each client and each recorder that you define. A client or a recorder that has no declared wizard is not available in the user interface and can be started only with a recording configuration file or programmatically.

When the New Recording Session wizard is complete, the wizard produces a recording session configuration that contains a client configuration and one or more recorder configurations. The recording session configuration is used to start a recording session and to instantiate the corresponding recorders and clients.

Several types of wizards can be defined, depending on how you have defined recorders and clients:

  • If you have defined only a recorder and you plan to use a client that comes with the product, define a recorder wizard.
  • If you have defined one or more types of clients and one or more types of recorders, and you want to combine clients and recorders in several ways, define a wizard for each client and a wizard for each recorder.
  • If you have defined one recorder type and one client type to be used together, consider defining a unique wizard that configures both of them.

Additional information about the New Recording Session wizard:

  • The recording method selection step is displayed only if there is more than one recording method available for the client that is selected in step 2.
  • Wizards that configure both recorders and clients take precedence over separate wizards for clients and recorders.

To define a client wizard:

  • Declare a new client wizard in the plugin.xml file by using the com.ibm.rational.test.lt.recorder.ui.clientWizard extension point.
  • Specify the client ID that the client wizard configures.
  • Optionally, provide an implementation class. If you do not provide a class, the wizard has no configuration page. If you provide a class, it must extend the com.ibm.rational.test.lt.recorder.ui.wizards.NewClientWizard class.

About the NewClientWizard class implementations:

  • This class extends the JFace class wizard, so the class must extend typical methods such as addPages().
  • The class is passed an empty client configuration, typed with the client ID selected by the user in step 2.
  • The class sets the client configuration options, which are available using the getClientConfiguration() method. This configuration is typically done in the doPerformFinish() method.

To define a recorder wizard:

  • Declare a new recorder wizard in the plugin.xml file by using the com.ibm.rational.test.lt.recorder.ui.recorderClientWizard extension point and the recordersWizard element.
  • Specify one or more recorder IDs that the recorder wizard configures.

    If the recorder wizard declares configurations for more than one recorder, examine the performsRecorderSelection attribute. This attribute specifies whether the wizard enables the user to choose which recorders to use or if the framework chooses which recorder to use. Depending on the conditions, the attribute then calls the wizard with the recorder ID that the user selected. In the first case, the recording method selection step is always displayed, whereas in the latter case, the recording method selection step can be skipped. In the first case, the wizard can enable several recorders, whereas in the latter case, only one recorder is enabled. Choose the first option if you need to enable more than one recorder in one recording session.

  • Provide an implementation class. This is optional only if you have associated the wizard with exactly one recorder or if the performsRecorderSelection attribute is false. If you do not provide a class, the wizard has no configuration page. If you provide a class, it must extend the com.ibm.rational.test.lt.recorder.ui.wizards.NewRecordersWizard class.

About NewRecordersWizard implementations:

  • This class extends the JFace class Wizard, so it must extend typical methods such as addPages().
  • If the performsRecorderSelection value is true, the class is passed null to its initialize() method and it must invoke the setRecorderConfigurations() method from its doPerformFinish() method, with the recorder configurations for each recorder that must be included in the recording session.
  • If the performsRecorderSelection value is false, the class is passed an empty recorder configuration, typed with the recorder ID selected in step 3, to its initialize() method and it must fill the empty recorder configuration with recorder options in its doPerformFinish() method.

To define a wizard that configures a client and one or more recorders altogether:

  • Declare a new recorder and client wizard in the plugin.xml file by using the com.ibm.rational.test.lt.recorder.ui.recorderClientWizard extension point and the combinedWizard element.
  • Specify the client ID that this wizard configures.
  • Specify one or more recorder IDs that this wizard configures.
  • If this wizard declares configurations for more than one recorder, examine the performsRecorderSelection attribute. This attribute specifies whether the wizard lets the user choose which recorders to use or if the framework chooses which recorder to use, and then invokes the wizard with the recorder ID selected by the user. In the first case, the recording method selection step is always displayed, whereas in the latter case, the recording method selection step can be skipped. In the first case, the wizard can enable several recorders, whereas in the latter case, only one recorder is enabled. Choose the first option if you need to enable more than one recorder in one recording session.
  • Provide an implementation class. This is optional only if you have associated the wizard with exactly one recorder or if the performsRecorderSelection attribute is false. If you do not provide a class, the wizard has no configuration page. If you provide a class, it must extend the com.ibm.rational.test.lt.recorder.ui.wizards.NewRecorderClientWizard class.

About NewRecorderClientWizard class implementations:

  • This class extends the JFace class Wizard, so it must extend typical methods such as addPages().
  • If performsRecorderSelection is true, the class is passed a null recorder configuration to its initialize() method and it must invoke the setRecorderConfigurations() method from its doPerformFinish() method, with the recorder configurations for each recorder that must be included in the recording session.
  • If performsRecorderSelection is false, the class is passed an empty recorder configuration, typed with the recorder ID selected in step 3, to its initialize() method and it must fill the empty recorder configuration with recorder options in its doPerformFinish() method.
  • The class is passed a client configuration, typed with the client ID selected in step 2, to its initialize() method. It must fill the client configuration with client options in its doPerformFinish() method.