Relevant for: GUI tests and components and API testing
Test Batch Runner enables you to run tests in a collective, successive test run.
Tests are run individually but sequentially in a single session.
You do not need to have UFT One open to use the Test Batch Runner.
Start the Test Batch Runner from the Start menu, or from the following path: <UFT One installation folder/bin/UFTBatchRunner.exe.
Tip: Once open, if you are using a concurrent license, select Test > Close UFT after Test Run to close UFT One and release the license once the test run is complete.
Use Test Batch Runner to create a list of tests that can be used to run the same batch of tests again another time. Save the list as a batch .mtb file.
Tip: You can include or exclude a test in your batch list from running during a particular batch run without affecting the other tests in the batch.
|Add a test batch file (.mtb)||
|Add individual tests||
All the tests from the selected folder are added to the Tests pane in the main Test Batch Runner window.
If you do not want to run all the tests in the target folder, select the check boxes next to the tests you want to run before you run the test batch.
Click the Run button to run the test batch.
The Output pane allows you view the results of the test run in run time, including:
- The test's path in the file system
- The progress of the test
- Any errors that occur during the run
Run the test batch via the command line to include UFT One tests in a build run, in a continuous integration system.
In the Command Line window, enter the following syntax:
UFTBatchRunnerCMD.exe -source "test path" -result "result path"
The following table describes the command-line parameters:
Specifies the path to a test batch file (.mtb) or folder containing the tests to be run. For example:
Specifies a location to save the test batch run results.
Pass test parameters in your command
To add test parameters to your command, use the following syntax:
UFTBatchRunnerCMD.exe -source "C:\users\GUITest1" -parameter "Parameter1=UFT;Parameter2=Test"
Passing test parameters is supported for running single tests only, and not for all tests in a folder.
You can include a semi-colon (;) in a parameter value, using a backslash (\) as an escape character, as shown in the following example for the Connection parameter:
UFTBatchRunnerCMD.exe -source "C:\GUITest1" -parameter "Parameter1=UFT;Parameter2=Test;Connection='Key1=value1\;key2=value2\;'"
Run the test batch using a Runtime Engine license
To run a test batch using a Runtime Engine license only, with UFT One on hidden mode, add the
-visible N parameter to your command line.
UFTBatchRunnerCMD.exe -visible N -source "C:\users\MySample.mtb"
Stop running the test batch via the command line
To stop running a test batch, use the following syntax:
UFTBatchRunnerCMD.exe -stop Y
Following the test batch run, the results are saved to a run results file.
This file includes details about whether the test passed or failed and errors in running the test.
In the Tests pane, click the results link for a specific test in the Report column.
If your test batch is run via the command line, navigate to the results folder indicated by the command output to view the run results.
Note: When an .mtb file runs from the command line, each test’s run results overwrite the previous result and in the end, only the run results of the last test in the batch are available.