Publish stubs by using an Ant task
<taskdef name="publishStubs" classname="com.ghc.ghTester.ant.PublishStubs" classpathref="tasklib" />
Rational Test Control Panel
<publishStubs serverUrl="http://<Host name or IP address>:7819/RTCP/"
domain="<Domain name>" environment="<Environment name>" project="<Path to project file>" />
The following table lists the attributes that you can use with the Rational Test Control Panel publishStubs Ant task for publishing stubs.
Attribute | Description | Required |
---|---|---|
optionsFile | A path to an XML file that contains the command options. Any options that are explicitly specified override those options set in this file. For details of the format of this file, see The Options file. | No |
serverUrl | URL of Rational Test Control Panel. | Yes |
domain | Domain name | Yes |
environment | Environment name | Yes |
project | The full path to project file. | Yes |
stubFilter | The filter that is used to select which stubs are published. A filter is defined by XML type tags that describe the hierarchy of the stubs to publish as it appears in the project within IBM Rational Integration Tester. Each filter declares the component names, an operation name, and the folder names that the stubs to publish belong to. If not specified, the filter defaults to publishing all stubs. For more information about selecting stubs by using a stub filter, see Specifying a stub filter. | No, default is to publish to all stubs in the project. |
majorVersion | The major version at which to publish the stubs. For more information about specifying stub versions, see Specifying publish versions. | No, default is to use the latest version on the server for that project, domain, and environment combination. |
minorVersion | The minor version at which to publish the stubs. For more information about specifying stub versions, see Specifying publish versions. | No, default is to use the latest version on the server for that project, domain, environment combination. |
updateMode | For more information about specifying the update mode, see updateMode. | No, default is publish all stubs, old and new. |
securityToken | The value of the security token to use for authentication with Rational Test Control Panel when domain security is enabled (optional). For more information, see Domain level security. | No, default is to send no token. |
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 |
Dockerfile and build context
<publishStubs destination="docker" outputDirectory="<Path to output directory>"
dockerfileTemplate="ubuntu" environment="<Name of environment>"
project="<Path to project file>" stubFilter="<Filter value>" />
The following table lists the attributes that you can use with the Dockerfile and build context publishStubs Ant task for publishing stubs.
Attribute | Description | Required |
---|---|---|
optionsFile | The path to an XML file that contains the command options. Any options that are explicitly specified override those options set in this file. For details of the format of this file, see The Options file. | No |
destination | The destination to publish stubs. The value can be docker or rtcp. The default is rtcp and is used if the destination option is not specified. docker must be specified to publish to Docker. | Yes |
outputDirectory | The path to the directory where the Dockerfile and other context files are output. | Yes |
dockerfileTemplate | A template Dockerfile that is used to generate a Dockerfile. Rational Integration Tester provides the ubuntu template for you to use. | Yes |
dockerfileComment | Optional text in quotation marks that is added as a comment in the generated Dockerfile. | No |
environment | Environment name | Yes |
project | The full path to a project file. | Yes |
stubFilter | The filter that is used to select which stubs are published. A filter is defined by XML type tags that describe the hierarchy of the stubs to publish as it appears in the project within IBM Rational Integration Tester. Each filter declares the component names, an operation name, and the folder names that the stubs to publish belong to. If not specified, the filter defaults to publishing all stubs. For more information about selecting stubs by using a stub filter, see Specifying a stub filter. | No, default is to publish to all stubs in the project. |
<publishStubs destination="docker" outputDirectory="C:\myImages\stubA"
dockerfileTemplate="ubuntu" environment="Env1"
project="C:\projects\P1\P1.ghp" stubFilter="<O>TestOperation</O>" />
Build a Docker image by using the Dockerfile
The Dockerfile and context files in the output directory can be used to build a Docker image.
docker build -t <name> <dockerfile_location>
Where name is the name and optionally a tag in the 'name:tag' format for the image that you want to create.
Where dockerfile_location is the output directory that contains the Dockerfile and build context files.
The following example on Windows systems, builds a Docker image that is named stubimage from a Dockerfile and build context files that were published to C:\myImages\StubA
docker build -t stubimage C:\myImages\stubA
If the output directory is not accessible by the Docker client, for example it is on a different computer, the directory must be copied to an accessible directory on the Docker client computer before you run the Docker build command with the dockerfile_location updated.
When the Docker image is created, it can be run as a container. For information about running the container, see Publishing stubs to Docker: Running in a Docker container.
For more information about building Docker images, see the Docker Build Documentation.
Error codes
For details of any error codes, see Exit codes for IBM Rational Integration Tester Command-line client and Ant client.