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 Running a test from a command line.
Procedure
-
Navigate to the directory that contains the cmdline.bat and
cmdline.sh files.
On Windows™ operating systems, this directory can be as productInstallationDirectory\cmdline. For example, C:\Program Files\IBM\RFT\cmdline.
-
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: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:Argument Value -workspace D:\My Workspace -project myProject -eclipsehome C:\Program Files\IBM\SDP -plugins C:\Program Files\IBM\IBMIMShared\plugins -suite myWebUITest.testsuite cmdline -workspace D:\My Workspace -project myProject -eclipsehome C:\Program Files\IBM\SDP -plugins C:\Program Files\IBM\IBMIMShared\plugins -suite Tests\myWebUITest.testsuite -protocolinput "webui.chrome.headlessmode.selected=TRUE"