Install UFT Mobile with Docker (on-premises)
This section describes how to install UFT Mobile on a Linux platform using Docker. With Docker, you develop, ship, and run applications via a container. This section is relevant only for on-premises deployments of UFT Mobile.
Docker uses a standard container format that lets developers prepare applications inside containers. System administrators and other teams, such as Quality Assurance engineers, run the container to deploy the application. For details, see the Docker documentation.
Follow the steps below to install Docker:
- Install Docker on the target machine, along with its dependencies. Currently, only the 64-bit version is supported. For installation details, see the Docker Installation guide.
- Set up the target machine environment as required.
Obtain the UFT Mobile server image
Obtain the latest UFT Mobile Docker image from the Docker hub.
Type the following in your Linux environment:
docker pull mobilelifecycle/uft-mobile:3.50
The image contains the Dockerfile of the UFT Mobile server that connects to a remote Postgres database. (The database installation is not included in the package.)
Note that SSL is not supported when installing UFT Mobile with a Docker image.
The PostgreSQL database used by UFT Mobile is not included in the UFT Mobile server image. Make sure that you have the PostgreSQL database up and running on a machine that can be accessed by the server.
We recommend PostgreSQL version 11. If you don't have PostgreSQL, obtain it from the Docker hub by typing
docker pull postgres:11.
To run the PostgreSQL container in the background:
Enter the following command when using the default PostgreSQL port (5432):
docker run --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=[postgres_password] -d postgres:[PostgreSQL version number]
If you need to use a custom port, run the following:
docker run --name postgres -p [custom_port]:5432 -e POSTGRES_PASSWORD=[postgres_password] -d postgres:[PostgreSQL version number]
Note: PostgreSQL adds a default user postgres.
After you have the PostgreSQL database up and running, start the UFTM server container.
To start the UFT Mobile container:
- Check that the default port, 8080, is available and not being used by another process.
Run the following command to run the UFT Mobile server in the background in detached mode:
docker run -d --name uftm -p 8080:8080 -e POSTGRES_HOST=[postgres_ip] -e POSTGRES_PORT=5432 -e POSTGRES_USER=[postgres_user] -e POSTGRES_PASSWORD=[postgres_password] -e FQDN=[host_ip] mobilelifecycle/uft-mobile
If you need to use a custom port, specify the custom port as follows:
docker run -d --name uftm -p [custom_port]:8080 -e POSTGRES_HOST=[postgres_ip] -e POSTGRES_PORT=5432 -e POSTGRES_USER=[postgres_user] -e POSTGRES_PASSWORD=[postgres_password] -e FQDN=[host_ip] mobilelifecycle/uft-mobile
Note: If you specify non-default ports, you also need to modify the ports on the connector and tools.
Starting with UFT Mobile 3.20, applications are no longer stored in the Postgres DB, but on the physical disk. This means you need to use a volume to maintain the persistence of the applications after the container is exited:
docker volume create uftm_data
docker run -d --name uftm [options] -v uftm_data:/opt/UFTMobile/mcStorage mobilelifecycle/uft-mobile
Begin your UFT Mobile test
To use UFT Mobile for testing your mobile app:
- Open the UFT Mobile home page http://<host>:<port> and log in with the default credentials:
It may take a minute for the server to start up, and for the page to open.
- Install the appropriate UFT Mobile connector on the machine/s to which you will be connecting devices with a USB cable. You can connect multiple devices to the Docker host machine. The connector can be installed on the same machine on which Docker is installed. For details, see Install the connector on a Windows machine, Install the connector on a Linux machine or Install the connector on a Mac machine.
Prepare your UFT Mobile test with the relevant testing tool, such as UFT, Sprinter, or TruClient.
Tips and guidelines
The following table includes a list of useful Docker commands:
||Lists the containers that are running|
||Stops the UFT Mobile service|
||Starts the UFT Mobile service|
||Lists the images|
||Check the logs of the running uftm container.
The output will have the following form:
Append server/log to the above path shown in the output. This folder contains the log files.