Start a stub by using an Ant task
You can start a stub by using the HCL Quality Server Ant tasks.
<taskdef name="startStub" classname="com.ghc.ghTester.ant.StartStub" classpathref="tasklib" />
<startStub domain="<Domain name>" environment="<Environment name>"
component="<Component name>" operation="<Operation name>"
name="<Stub name>" version="<Stub version number>"
serverUrl="https://<Host name or IP address>:5443/RTCP/"/>
- create-update-delete-environment.xml
- lock-unlock-environment.xml
- publish-stubs.xml
- start-stop-scenario.xml
- start-stop-stub.xml
startStub
Ant task for starting a stub. Attribute | Description | Required |
---|---|---|
serverUrl | URL of the HCL Quality Server. | Yes |
domain | Domain name | Yes |
environment | Environment name | Yes |
component | Component the stub exists within. | No |
operation | The operation the stub exists within on the server. | No |
name | The name of the target stub to start. | Yes |
version | Version of the target stub to start. Note: If you are using HCL OneTest™ API
8.5.0.1 or later, and the HCL Quality Server command line or Apache Ant tasks are used to start a stub,
and if no stub version information is provided, it is the latest version of a stub that is run. If
you are using 8.5.0 or earlier, and the HCL Quality Server command line or Apache Ant tasks are used to
start a stub, and if no stub version information is provided, it is the earliest version of a stub
that is run. |
No |
attributes | Comma-separated list of agent attributes identifying the agent to run on. | No |
async | Run asynchronously (flag). | No, default is synchronous. |
username | Specify the user name to authenticate with HCL Quality Server if the environment is locked and the domain security is disabled. | No |
securityToken |
Specify the security token generated for the user 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. For more information, see Domain level security and Managing environments. |
No, default is to send no token. |
disablePerformanceOptimisations | Specify the value "true" to disable performance optimization when starting the stub (optional). | No |
workerThreadCount | The amount of worker threads used to service requests to the stub (optional). | No |
haltOnFailure | Set to true to fail the Ant script if the stub fails to start (flag). | No, default is false. |
failureProperty | The name of a property that is set in the event of a failure. | No |
dedicatedEngine | Use this option to run the stub by using a dedicated engine that is not used to run
other stubs even if they are published from the same project. You can specify the JVM options by
using the Example:
Note:
|
No |
|
Use the
force option to start the stub by attempting to ignore
any warnings or errors that might occur.
You can specify if a specific problem identifier must either be ignored or considered
when the stub is started. The problem identifier parameters are:
Example:
|
|
secretsAuthorization |
User offline token for authorizing the client to access HCL OneTest™ Server. For example, the command to start a stub that uses the secretsAuthorization
attribute
follows:
For more information, see Accessing HCL OneTest Server from IntegrationTesterCmd, ANT CLI, Maven CLI, or in a REST API call. |
No |
Error codes
For details of any error codes, see Exit codes for Command-line client and Ant client.