Micro Focus Contributor
Micro Focus Contributor

< (UFT) Support Tip > How to Run a Test Batch Using the Windows Command Line

Hello Everyone,


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;


  1. 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:

  1. Open the Run Results Viewer from the Start menu. The Open Run Results dialog box opens.
  2. In the Open Run Results dialog box, select the Results XML file option.
  3. Navigate to the Results.xml file under the test's Report folder and click Open.



 HP Support

Labels (1)
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.