Running a Web UI test or compound test from the command line on multiple browsers

In addition to running a Web UI test from the product interface, you can automate the test effort by running the test from the command line. To accelerate test execution, you can run a single Web UI test and/or a compound test containing Web UI tests on multiple browsers and devices simultaneously.

About this task

Use the -vmargs command line argument to run the Web UI or compound test on multiple browsers or on all browsers and connected mobile devices simultaneously. Use variable names from the following table to specify the browsers to run the command on. To specify multiple browsers, separate the variable names with commas, for example, ff,chrome,ie. To run the test on all browsers and connected mobile devices, use the variable name all. Do not use spaces for the -vmargs arguments.

Browser Variable
Mozilla Firefox ff
Google Chrome chrome
Internet Explorer ie
Microsoft Edge edge
Apple Safari safari
Note: If you are running a compound test that has Web UI tests with different browsers specified for individual tests, then you must change the visibility scope of the RTW_WebUI_Browser_Selection variable in the test editor for each test. By default, RTW_WebUI_Browser_Selection is set to All tests for this user and this results in using the browser specified for the first test for all the tests in sequence in a compound test. You must change the value of RTW_WebUI_Browser_Selection to This test only in the Variable Details pane for each test before running the compound test.

Procedure

  1. To run a test from the command line, go to the directory that contains the cmdline.bat and cmdline.sh files. On Windows operating systems, this directory is typically <Install_Directory>\cmdline, for example, C:\Program Files\HCL\DevOpsTest\cmdline.
  2. Issue the cmdline command, followed by the arguments defined in the Configuration of test runs from the command line topic.
  3. To run the test simultaneously on all supported desktop browsers and connected mobile devices, use the -vmargs argument, as follows:
    -vmargs "-Dall.available.targets.in.parallel=all" 
  4. To run the test simultaneously on a selected set of browsers, use the -vmargs argument, as follows:
    -vmargs "-Dall.available.targets.in.parallel=ie,ff,chrome"  

Example

cmdline -workspace D:\My Workspace -project myProject -eclipsehome C:\Program Files\HCL\DevOpsTest -plugins C:\Program Files\HCL\HCLIMShared\plugins -suite Tests\myWebUITest.testsuite -vmargs "-Dall.available.targets.in.parallel=ie,ff,chrome"