Stop a stub by using the command line
You can stop all instances of a stub by using the HCL OneTest™ API command line. This option is useful in situations where Ant is not available.
IntegrationTesterCmd Options stop-stubIntegrationTesterCmd --serverUrl "https://Hostname or IP address:5443/RTCP"
--domain <Domain name> --environment <Environment name>
--name <Stub name> stop-stubIntegrationTesterCmd --serverUrl "https://Hostname or IP address:5443/RTCP/"
--domain <Domain name> --environment <Environment name>
--component <Component name> --operation <Operation name>
--name <Stub name> --version <Stub version number>
--username <User name> --async stop-stubManaged stubs
IntegrationTesterCmd Options switch-off-stubFor more information about managed stubs, see Server-based stubs.
List of available options lists the options that
you can use with the IntegrationTesterCmd command for stopping a stub and List of available options lists the options available
for stopping a managed stub.
| Option | Description |
|---|---|
| --serverUrl/-u | URL of the HCL® Quality Server. |
| --domain/-d | Domain name |
| --environment/-e | Environment name |
| --component/-c | Component the stub exists within (optional). |
| --operation/-o | The operation the stub exists within on the server (optional). |
| --name/-n | The name of the target stub to stop. |
| --version/-v | Version of the target stub to stop (optional). Note: If you are using HCL OneTest™ API
9.1.1.1 or later, and the HCL®
Quality Server command line or Apache Ant tasks are used to stop a stub, and if no stub version
information is provided, it is the latest version of a stub with running instances that is
stopped. If you are 9.1.1 or earlier, and the HCL®
Quality Server command line or Apache Ant tasks are used to stop a stub that has multiple versions,
and if no stub version information is provided, an error is reported. |
| --async/-a | Run asynchronously; defaults to synchronous (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. |
| Options | Description |
|---|---|
| --serverUrl/-u | URL of the HCL® Quality Server. |
| --domain/-d | Domain name |
| --environment/-e | Environment name |
| --name/-n | The name of the target stub to start. |
| --id/-i | The ID of the target (Optional). |
| --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. |
Error codes
For details of any error codes, see Exit codes for Command-line client and Ant client.