Creating a Batch Test - WinRunner

A batch test is a test script that calls other tests. You program a batch test by typing call statements directly into the test window and selecting the Run in batch mode option in the Run category of the General Options dialog box before you execute the test.

A batch test may include programming elements such as loops and decisionmaking statements. Loops enable a batch test to run called tests a specified number of times. Decision-making statements such as if/else and switch condition test execution on the results of a test called previously by the same batch script. See “Enhancing Your Test Scripts with Programming,” for more information.

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:\\pbtests\\open" ();
call "c:\\pbtests\\setup" ();
call "c:\\pbtests\\save" ();
}

To enable a batch test:

  1. Choose Tools > General Options.
  2. The General Options dialog box opens.

  3. Click the Run category.
  4. Select the Run in batch mode check box.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WinRunner Topics