Running an AFT suite in a containerized workbench and agents by using Docker Compose
You can run an Accelerated Functional Test (AFT) suite in a containerized workbench and agents after you deploy your Docker images. You can use the Docker Compose tool to run an AFT suite and need not install the workbench or the agents on different computers.
Before you begin
- You must have configured a Docker container.
- You must have exported test assets to a location from where Docker can import them.
Notes:
- You must use a Bash shell to run the commands for executing tests. In Windows operating system, you can use Git Bash.
- The version number of the container images and the desktop products must
match. If you have a previous version of the container image, you must
uninstall it and then install the current version. To uninstall the image,
you must use the following commands:
To stop the container:
docker stop "CONTAINER ID"
To uninstall the image:
docker rmi -f "image ID"
Procedure
-
Run the following command to load the workbench image into the Docker
repository:
tar --wildcards --to-command='docker load' -xzf <workbenchImageName> 'images/'*
For example, workbenchImageName can be ibm-rtw-<versionNumber>.tar.gz.
When the workbench image is loaded into the Docker repository, the following message is displayed:-Loaded image: imageFileName:versionNumber
-
To run the tests on containerized agents, you must load the agent image into the Docker
repository by running the following command:
docker load -i <agentImageName>
For example, the agent image name could be ibm-rtw-<versionNumber>.tar.gz.
When the agent image is loaded into the Docker repository, the following message is displayed:- Loaded image: imageFileName:versionNumber
- From the workbench, create an AFT Suite that lists all the agents that are used for the distributed run of multiple tests on multiple agent locations.
-
To run an AFT Suite, you must initiate a run in which the Docker container agents are
automatically connected to the workbench container. To do this, install the Docker
Compose tool and complete the following steps:
- Verify whether the run is completed successfully. If you have used an option such as -exportlog to generate results to a shared volume, check the directory in your host computer that was mapped to hostImportedData and retrieve the exported data.
-
To stop the agents when the workbench container exits, run the following command:
docker-compose up --abort-on-container-exit
Table 1. Command Description MASTER_NAME Specifies the name of the workbench image. AGENT_NAME Specifies the name of the agent image. RATIONAL_LICENSE_FILE=<PORT>@<HOST> Specifies the port number of Rational License Key Server, usually 27000, and the server IP address. The floating license for the product and VT-packs must be on the license server. hostImportedData:/containerImportedData Specifies the workspace location on the host computer and the container that contains the test assets that are not compressed. The results of the test execution are saved to the directory that you specify on the host computer. <agentImageName>:<imageVersion>
Specifies the name of the agent image and its version to run. TEST_IMPORT_PATH=<PATH> Specifies the location of the compressed test assets to be imported into the container. The location path is on the container side and not the host. For example, /containerTestAssets/ProjectName.zip. The volume and path names are user-defined and must be consistent. workbenchimageName:imageVersion Specifies the name of the workbench image and its version to run. cmdline Specifies the existing command-line arguments to define the location of the workspace, project name, test name, results file name, and the location of the exported logs.