Generating tests without a UI

To test converters and test generators during the development process, you can run them before any UI component is ready for launching them.

You can start test generation that includes the converters and test generators that you have developed by writing a test generation configuration file. This file specifies which converters and test generators to use and options for each.

This file is an example of such a configuration file:

<hot-perf:testGeneration xmlns:hot-perf="hot-perf"
 	recsession="/Project/MyRecording.recsession"
 	autoDataCorrelation="true"
 	autoDataCorrelationNames="true"
 	output="/Project/MyTest.testsuite">
 <cnv:packetSorter xmlns:cnv="converter:com.ibm.rational.test.lt.testgen.core3"/>
 <cnv:myConverter xmlns:cnv="converter:org.xyz.myplugin"/>
 <gen:myTestGenerator xmlns:gen="generator:org.xyz.myplugin"/>
</hot-perf:testGeneration>

In the preceding example, replace org.xyz.myplugin with the name of the plug-in that defines the converter and the test generator. Replace myConverter with the converter ID, and myTestGenerator with the test generator ID. Save the file with the .testgenconfig extension.

In the configuration file, a testGeneration node can contain as many converter configurations and test generator configurations as required. All the referenced converters and test generators are included in the test generation process, with the options from the configuration file passed to them.

To launch test generation from a test generation configuration file, right-click the file, and then select Generate Test.

Feedback