Extending the test generation framework
Test generation consists of processing the recorded data and producing a test.
The recording-session file that is produced during recording provides the input for the test generation operation. Before writing a test generator, you must identify the type of data that the generator uses.
Recording and test generation are typically chained when you use the New Test From Recording wizard, but this relationship is not always established. The user can choose to produce only a recording, using the New Recording Session wizard, and can also choose to generate a test from an existing recording.
Test generation happens in the following stages and phases:
- The conversion stage is a preliminary step, during which the original packets can be filtered, sorted, aggregated, or converted to a different, typically higher-level, protocol. Extensions can contribute additional converters. For more information, see Defining a new packet converter.
- The test generation stage consists of using the recorder packets that are sent from the converter stage, and then distributing the recorder packets to the appropriate test generator. The test generator then produces the corresponding model elements in the test model. Extensions can contribute new test generators for processing a new type of recorded data or producing a new type of test element. For more information, see Defining a new test generator.
- The data processing phase happens after a raw test has been completely generated. During this phase data correlation and data transformation are performed.
- The test splitting phase is an optional step that runs if split points were inserted during the recording. The complete test is split into several tests.
The test generation framework also defines two wizards:
- The Generate Test wizard opens either when the user gestures to generate a test from an existing recording or automatically after a recording is complete. If user input is not required, the Generate Test wizard is not displayed, and test generation automatically follows the recording. Extensions can contribute to this wizard. For more information, see Defining a test generator wizard.
- The New Test From Recording wizard is the highest-level wizard and combines the New Recording Session wizard and the Generate Test wizard. For more details about the recording aspects of this wizard, see Defining wizards for recorders and clients. For more details about the test generation aspects of this wizard, see Defining a test generator wizard.