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 v9 32-bit ie
Internet Explorer v9 64-bit ie64
Internet Explorer v10 and v11 ie
Microsoft Edge edge
Apple Safari safari

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 productInstallationDirectory/cmdline, for example, C:\Program Files\__BRAND_NAME__\__SDP_PATH__\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\IBM\SDP -plugins C:\Program Files\IBM\IBMIMShared\plugins -suite Tests\myWebUITest.testsuite -vmargs "-Dall.available.targets.in.parallel=ie,ff,chrome"