Running automated tests with containerized agents on IBM® Cloud Private

To adopt IBM® Cloud Private fully and manage the entire development to deployment workflow on cloud, you would want to start and stop capabilities with a few clicks. By providing the agents in containers, you can dynamically provision capability as required without procuring the machines and installing the agents.

Before you begin

You must have configured IBM® Cloud Private as per the instructions in Configuring IBM Cloud Private.

About this task

You must use only floating licenses to play back the tests.

To automate deployment and playback of the tests, you can choose to create bash scripts for the Kubernetes commands and integrate with Jenkins.
Note: The version number of the container images and the desktop products must match. If you have previous version of the container image, uninstall it and install the current version. To uninstall the image, use these commands:
  1. Stop the container by running
    docker stop "CONTAINER  ID"
    .
  2. Uninstall the image by running
    docker rmi -f "image ID"
    .

Procedure

  1. Log in to the IBM® Cloud Private management console and complete the following steps:
    1. From the navigation menu, click Workloads > Deployments > Create Deployment
    2. On the Generals tab, enter a name for your deployment.
    3. On the Container tab, enter the name of the agent container and the image to use for the container. Provide the image name in the following format:
      cluster_CA_domain:8500/namespace/imagename
    4. In the Enviornment Variable tab, for Name, enter MASTER_NAME and for Value enter the IP address of the workbench computer workbenchIP
    5. Click Create.
    6. Create a deployment for the second agent image. Use another name for the agent image. You can use the same image tag and the environment variables.
  2. Verify that you have two deployments of the agent by clicking Workloads > Deployments.
  3. From the Web UI Test perspective, select the Web UI tests to run and from the context menu click Run Distributed Tests. The tests are distributed among the connected agents. For more information, see Running multiple tests simultaneously.

What to do next

To stop the agents, in the management console, click Workloads > Deployments and under Action select Remove to remove each agent deployment.