Start a scenario by using the command line

You can start a scenario by using the HCL OneTest API command line. This option is useful in situations where Ant is not available.

Note: The command-line tasks provide an option to wait for all of the stubs in a scenario to start before returning. This is the default option but you can disable it by specifying the async option. If waiting, the commands must also alert users about whether a scenario was started successfully.
Note: The HCL® Quality Server Command-Line Client does not support starting a scenario while another scenario is running in the specified environment. However, you can opt to force the start of a scenario, which will stop any other scenarios that are running.
The syntax to use is as follows::
IntegrationTesterCmd Options start-scenario

An example syntax for synchronous mode:

IntegrationTesterCmd --serverUrl "https://Hostname or IP address:5443/RTCP/" 
--domain <Domain name> --environment <Environment name> 
--name <Scenario name> start-scenario

An example syntax for asynchronous mode:

IntegrationTesterCmd --serverUrl "https://Hostname or IP address:5443/RTCP/" 
--domain <Domain name> --name <Scenario name> 
--owner <Owner name> --username <User name> --force 
--async --stopStubs ALL start-scenario

The following table lists the options that you can use with the IntegrationTesterCmd command for starting a scenario.

Table 1. List of available options
Option Description
--serverUrl/-u URL of the HCL® Quality Server.
--domain/-d Domain name
--environment/-e Environment name
--name/-n The name of the target scenario to start.
--owner/o Filters the scenarios by owner (optional).
--stopStubs Available settings are as follows:
  • ALL: Stop all stubs in the environment
  • OPERATIONS: Stop the stubs for the operations in the scenario
  • NONE (default): Leave any existing stubs running (optional).
--async/-a Run asynchronously; defaults to synchronous (flag).
--force/-f Attempt to first stop any scenario that is already running in the environment (flag).
--username/-l Specify the user name to authenticate with the server if the environment is locked and the domain security is disabled.
--securityToken

Specify the security token generated for you to authenticate with HCL® Quality Server when the domain security is enabled. In the locked environment mode, the operation can be performed by the user who locked the environment.

Scenario selection

For a description of how to select a scenario, see Scenario selection.

Error codes

For details of any error codes, see Exit codes for Command-line client and Ant client.