Create and run a test batch
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.
Open the Test Batch Runner
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.
Add batches or tests
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. |
Note: When adding tests through the Tests > Add menu command, you must select all the tests from the target folder.
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.
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
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 UFTBatchRunnerCMD.exe and the source switch followed by the test batch file (.mtb) or folder containing the test.
For example, your command line might contain text like this:
UFTBatchRunnerCMD.exe -source "C:\users\MySample.mtb"
UFTBatchRunnerCMD.exe -source "C:\users\APITest1"
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"
Note:
-
Passing test parameters is supported for running single tests only, and not for all tests in a folder.
-
UFT One versions 2022 and later: 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.
For example:
UFTBatchRunnerCMD.exe -visible N -source "C:\users\MySample.mtb"
Stop running the test batch via the command line
Supported in UFT One versions 2023 and later
To stop running a test batch, use the following syntax:
UFTBatchRunnerCMD.exe -stop Y
View the test batch run results
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.
See also: