Accessing and using Ant tasks
You can use the Apache Ant tasks package provided with HCL DevOps Test Virtualization Control Panel (Test Virtualization Control Panel) that contains the Ant tasks with which you can control the environment, scenario, and stubs in Test Virtualization Control Panel.
Note: Starting in 9.1.1, the Ant tasks package was renamed to
AntClient.zip from RTCPAntClient.zip.
You must perform the following tasks before you can use the Ant tasks:
- Download and extract the Apache Ant task package, AntClient.zip,
from Test Virtualization Control Panel.
For more information, see DevOps Test Integrations and APIs tool packages.
The environment, scenario, and stub Ant tasks are located in the
com.ghc.ghTester.ant<Version Number>.jar
file that is available in the downloaded AntClient package. - You can use the XML files that are provided as samples in the
package to perform the following tasks:
- Creating an environment. See Creating an environment by using an Ant task.
- Deleting an existing environment. See Deleting an environment by using an Ant task.
- Updating values of the attributes of an environment. See Updating an environment by using an Ant task. You can update the values of the following attributes of an environment:
- The URL of Test Virtualization Control Panel.
- The domain name.
- The name of the environment.
- The tags to be updated in the environment.
- Locking an environment. See Locking an environment by using an Ant task.
- Unlocking an environment. See Unlocking an environment by using an Ant task.
- Publishing a stub. See Publish stubs by using an Ant task.
- Starting a stub. See Start a stub by using an Ant task.
- Stopping a stub. See Stop a stub by using an Ant task.
- Starting a scenario. See Start a scenario by using an Ant task.
- Stopping a scenario. See Stop a scenario by using an Ant task.
- Updating the values of the attributes of a managed stub. See Updating a managed stub by using an Ant task. You can update the values of the following attributes:
- The log level configured in the stub definition.
- The Pass-through behavior for the stub.
- The performance optimization value.
- The delays for response.
- The input tags.
- The agent tags.
- The number of worker threads.
- The options for a dedicated JVM engine.
- The security token that is required to authenticate the connection if domain-level security is enabled.
- Open the XML file for the task that you want to perform and follow
the instructions detailed in the example XML file.You can use the XML file for the tasks indicated in the following table:
For the task to... Use... - Create an environment.
- Delete an existing environment.
- Update values of the attributes of an environment.
create-update-delete-environment.xml - Lock an environment.
- Unlock an environment.
lock-unlock-environment.xml Publish a stub. publish-stubs.xml - Start a stub.
- Stop a stub.
start-stop-stub.xml - Start a scenario.
- Stop a scenario.
start-stop-scenario.xml Update the values of the attributes of a managed stub. update-managed-stub.xml
You can also run the Ant scripts that you can generate from Test Integrations and APIs as an Ant task. See Generating Ant scripts to run tests or suites.