Saturday, December 27, 2008

Creating a Batch Test

A batch test is a test script that calls other tests. You program a batch test by typing call statement directly into the test window and selecting the Batch Run in Batch Mode option in the Run tab of the General Option dialog box before you execute the test.

A batch test my include programming elements such as loops and decision making statements. Loops enable a batch test to run called tests a specified number of times. Decision making statement such if else and switch condition test execution on the results of a test called previously by the same batch script.

For example,the following batch test executes three tests in succession, then loops back and calls the tests again. The loop specifies that the batch test should call the tests ten times.

for (i=0;i<10;i++)
{
call "c:\\abtests\\open" ();
call "c:\\abtests\\setup" ();
call "c:\\abtests\\save" ();
}

To enable a batch test:

1. Choose Settings->General Options

The General Options dialog box opens

1. Click the Run tab
2. Select the Run in Batch Mode check box.
3. Click Ok to close the General Options dialog box.