Stop a stub by using an Ant task

You can stop a stub by using the IBM® Rational® Test Control Panel Ant tasks.

Here is an example syntax:
<taskdef name="stopStub" classname="com.ghc.ghTester.ant.StopStub" classpathref="tasklib" />

<stopStub domain="<Domain name>" environment="<Environment name>" component="<Component name>" 
operation="<Operation name>" name="<Stub name>" version="<Stub version number>" 
serverUrl="https://<Hostname or IP address>:5443/RTCP/"/>

The following table lists the attributes that you can use with the stopStub Ant task for stopping a stub.

Table 1. List of available attributes
Attribute Description Required
async Run asynchronously (flag). No, default option is synchronous.
component Component the stub exists within. No
domain Domain name Yes
environment Environment name Yes
failureProperty The name of a property that is set in the event of a failure. No
haltOnFailure Set to true to fail the Ant script if the stub fails to stop (flag). No, default is false.
name The name of the target stub to stop. Yes
operation The operation the stub exists within on the server. No
serverUrl URL of the Rational® Test Control Panel Yes
securityToken

Specify the security token generated for you 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.

No, default is to send no token.
version Version of the target stub to stop. No
username Specify the user name to authenticate with the server if the environment is locked and the domain security is disabled. No

Error codes

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