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:
Required license
TestEngine requires a SmartBear ID-based license to run in a docker container. To learn how to do that, see Licensing TestEngine. If you are installing headlessly, you can use the CLI to install an ID-based license.
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 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
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
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
Sample full command
Get TestEngine URL running in a Docker container
To work with TestEngine running in a Docker container, you need to know its endpoint:
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:
TestEngine endpoint is the following:
Troubleshooting
If you cannot run Docker due to the Drive has not been shared error, perform the following steps:
-
Right-click the Docker icon in the notification area and select Settings:
-
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:
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: