Run TestEngine in Docker Container

Applies to TestEngine 1.30, last modified on March 19, 2024

About

Docker runs applications in containers with environment prepared for your application. The smartbear/readyapi-testengine docker image provides you with preconfigured environment with the installed TestEngine that you can use to run ReadyAPI functional tests in container.

Docker image

To run a TestEngine in Docker, use the following image from Docker Hub:

https://hub.docker.com/r/smartbear/readyapi-testengine/

Required license

TestEngine requires a floating file based or a SmartBear ID-based license. Once you run a docker container, you will have to install a license in order to use TestEngine. To learn how to do that, see Licensing TestEngine.

Hardware requirements

This topic describes how to use Docker with TestEngine on the Hyper-V virtualization platform. To do that, use the same environment you use to run your Docker images. There are no specific requirements for this.

To learn more, see the Docker documentation:

To run TestEngine tools in Docker containers on other virtualization platforms, additional configuration may be required. Please see the corresponding documentation.

Pulling TestEngine image from Docker Hub

To get TestEngine Docker image, pull it from Docker Hub. To do this, use the following command:

docker pull smartbear/readyapi-testengine

Docker command syntax

To run TestEngine in a Docker container, use the following command line:

docker run -p <host-port>:8080 smartbear/readyapi-testengine

Arguments

-v=Extensions Folder:/ext

Specifies the folder whose content should be copied to the /bin/ext folder of the TestEngine installation in the container. Use this argument if your project requires additional libraries, such as database drivers or plugins.

Usage: -v="C:\Work\ReadyAPI Extensions":/ext
Note: On some systems, you may need to change the path in the following way:
"C:\Work\ReadyAPI Extensions" -> "/host_mnt/C/Work/ReadyAPI Extensions"

-v=TestEngine data:/data

Specifies the folder where you store TestEngine data: test job history, added users, information on activated licenses, and so on. If there is no data, TestEngine creates it. Use this argument to pass TestEngine data between several container runs.

Usage: -v="C:\Work\TestEngine data":/data
Note: On some systems, you may need to change the path in the following way:
"C:\Work\TestEngine data" -> "/host_mnt/C/Work/TestEngine data"

-e TESTENGINE_PASSWORD=<password>

Specifies the password of the default administrator account when you run a container without TestEngine data, or if it is empty. Also, you set the password when resetting the account by using the ‑e TESTENGINE_RESET_ADMIN_ACCOUNT=true option.

Usage: -e TESTENGINE_PASSWORD=p@ssw0rd

If not specified, TestEngine generates a random password and prints it to the output log. See Default admin account.

-e TESTENGINE_RESET_ADMIN_ACCOUNT=true

Commands TestEngine to reset the password of the default administrator account. To set a specific password instead of the generated one, use the ‑e TESTENGINE_PASSWORD=<password> option.

Usage: -e TESTENGINE_RESET_ADMIN_ACCOUNT=true

-p <host-port>:8080

Required. Binds the container port on which TestEngine runs, to a port on a host machine.

Usage: -p 8082:8080

readyapi-testengine

Required. Specifies the image to create a container from.

Sample full command

docker run -v="C:\Work\ReadyAPI\ext":/ext -p 8082:8080 smartbear/readyapi-testengine

Get TestEngine URL running in a Docker container

To work with TestEngine running in a Docker container, you need to know its endpoint:

http://<host-address>:<binded-port>

where —

  • host-address - Address of the host machine where the container is running.

  • binded-port - Port on the host machine that you bind to the 8080 port on the container.

For example, if you run a container on a local machine with the following command:

docker run -p 8082:8080 smartbear/readyapi-testengine

TestEngine endpoint is the following:

http://localhost:8082

If you cannot run Docker due to the Drive has not been shared error, perform the following steps:

  1. Right-click the Docker icon in the notification area and select Settings:

    Docker image: Docker context menu
  2. On the Shared Drives page of the Settings dialog, select all the drives you use to run the Docker container.

    If your drives have already been shared, but the error occurs anyway, turn off sharing. After you apply the changes, repeat these steps to share the drives again.

    To share your drivers, select them in the list and click Apply:

    Docker image: Docker context menu

    Click the image to enlarge it.

    You may need to enter the credentials of your system account to apply the changes.

Next Step

Once you run TestEngine in a Docker container, you work with it like you do with a typical TestEngine installation.

The following topics describe how to perform some common tasks:

Common tasks
Administration tasks

See Also

Administrative Tasks

Highlight search results