Start a scenario by using an Ant task

You can start a scenario by using the IBM® Rational® Test Control Panel Ant tasks.
Here is an example syntax:
<taskdef name="startScenario" classname="com.ghc.ghTester.ant.StartScenario" classpathref="tasklib" />

<startScenario domain="<Domain name>"
environment="<Environment name>" name="<Scenario name>"
serverUrl="http://Host name or IP address:7819/" />
The following example usage files for the Ant tasks are available in the RTCPAntClient.zip package that can be downloaded from Rational Test Control Panel. For more information, see Rational Integration Tester tool packages

The following table lists the attributes that can you can use with the startScenario Ant task for starting a scenario.

Table 1. List of available attributes
Attribute Description Required
serverUrl URL of Rational Test Control Panel. Yes
domain Domain name Yes
environment Environment name Yes
name The name of the target scenario to start. No
owner Filters the scenarios by owner. No
stopStubs Available settings are as follows:
  • ALL: Stop all stubs in the environment.
  • OPERATIONS: Stop the stubs for the operations in the scenario.
  • NONE: Leave any existing stubs running.
No, default is NONE
async Run asynchronously (flag). No, default is synchronous.
force Attempt to first stop any already-running scenario in the environment (flag). No, default is false.
username Specify the user name to authenticate with Rational Test Control Panel if the environment is locked and the domain security is disabled. No
securityToken

Specify the security token generated for the user to authenticate with Rational Test Control Panel when the domain security is enabled. In the locked environment mode, the operation can be performed by the user who locked the environment. For more information, see Domain level security and Managing environments.

No, default is to send no token.
haltOnFailure Set to true to fail the Ant script if the scenario fails to start (flag). No, default is false.
failureProperty The name of a property that is set in the event of a failure. No

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 IBM Rational Integration Tester Command-line client and Ant client.


Feedback