Enabling Test Generation

You can configure your test generation by defining three options.

In order to initiate test generator it is absolutely necessary to set the tag testgen, other options have a default value assigned to them.

Set tag

Test generation in Qentinel Pace can be enabled for each test case individually. You have control on which tests you would like to generate test cases from. The test generation is enabled by providing a special tag testgen to test case.

My test case
    [Tags]    testgen

Set a target number for generated tests

The number of generated test cases can be controlled by providing numtests option. This directive is provided with the desired number of test cases. In example below, 50 tests will be generated.

My test case
    [Tags]    testgen   numtests=50

This directive sets the target number for test generation. Qentinel Pace uses this number in optimization. Please note that Qentinel Pace will over-ride the target in scenarios where the set target is lower than the absolute minimum number of test cases that needs to be generated to meet all the requirements.

It is strongly recommended to always provide a target number for generated test cases. By default it is set to 100.

Set your test generation mode

Test generation mode instructs test generator which algorithm to use when generating test cases. The algorithm determines how different combinations are formed. It is recommended to know a bit about combinatorial testing in order to get a better understanding of different generation mode.

Linear (default) option instructs the test generator to disable combinatorial testing and to apply a linear data selection mechanism where the test generator aims to generate a test collection where each test data value is tested at least once. For example, the test below will generate two test cases, one with data combination (John, Johnson) and second with (Jane, Janeson).

My test case
    [Tags]      testgen       linear
    TypeText    First name    [John, Jane]
    TypeText    Last name     [Johnson, Janeson]

Linear test generation mode is selected by default.

Nwise option, on the other hand, enables the combinatorial test data generator and it is provided with a numeric argument which defines the number of variables interacting. In the example below pairwise testing is enabled by setting nwise=2. And it will generate 4 test cases with data combinations (John, Johnson), (John, Janeson), (Jane, Johnson) and (Jane, Janeson).

My test case
    [Tags]      testgen       nwise=2
    TypeText    First name    [John, Jane]
    TypeText    Last name     [Johnson, Janeson]