< (UFT) Support Tip > How to Run a Test Batch Using the Windows Command Line
This topic is about how to run a batch of test using windows command line and relevant for both GUI tests, components and API tests.
Steps to follow;
- Open the Windows Command Line window
Start> Run> type cmd.exe to open the windows command line
2. Provide the source folder for the batch file or tests
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"
3. Run the test batch
After entering the Test Batch Runner command and the location of the folder containing your tests, press ENTER. Test Batch Runner runs the test batch.
For API tests, the test log is displayed in the command window.
4. View the test batch run results (API testing only)
When the test batch run is complete:
- Open the Run Results Viewer from the Start menu. The Open Run Results dialog box opens.
- In the Open Run Results dialog box, select the Results XML file option.
- Navigate to the Results.xml file under the test's Report folder and click Open.