Running a Web UI test or compound test in the headless mode from the command line

When you do not want to view the GUI as the recorded test is played back on a web browser, you can choose to run the test in the headless mode from the command line. Running of tests in the headless mode is useful when you use an automated testing environment.

Before you begin

You must have completed the following tasks:
  • You must have recorded a single Web UI test, compound test with multiple Web UI tests, or an AFT Suite that you want to run in the headless mode.

  • Read and been familiar with the command line arguments to use with the cmdline command. See Configuration of test runs from the command line.

Procedure

  1. Navigate to the directory that contains the cmdline.bat or cmdline.sh file.

    On Windows operating systems, this directory can be as <Install_Directory>\cmdline. For example, C:\Program Files\HCL\DevOpsTest\cmdline.

  2. Issue the following argument for the specific browser along with the other arguments in the cmdline command to run the test in the headless mode:
    Browser Argument
    Chrome -protocolinput "webui.chrome.headlessmode.selected=TRUE"
    Edge -protocolinput "webui.edge.headlessmode.selected=TRUE"
    Firefox -protocolinput "webui.firefox.headlessmode.selected=TRUE"
    For example, consider the following values for the different arguments:
    Argument Value
    -workspace D:\My Workspace
    -project myProject
    -eclipsehome C:\Program Files\HCL\DevOpsTest
    -plugins C:\Program Files\HCL\HCLIMShared\plugins
    -suite myWebUITest.testsuite
    If you want to run the Web UI test or compound test in the headless mode by using the Chrome browser, then the arguments that you can enter in the command line are as follows:
    cmdline -workspace D:\My Workspace -project myProject -eclipsehome C:\Program Files\HCL\DevOpsTest -plugins C:\Program Files\HCL\HCLIMShared\plugins -suite Tests\myWebUITest.testsuite -protocolinput "webui.chrome.headlessmode.selected=TRUE"