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 |
Procedure
- 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.
- Issue the cmdline command, followed by the arguments defined in the Configuration of test runs from the command line topic.
-
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"
-
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"