Run the docker image with environment variables
Run the OpenText Functional Testing for Developers docker image with various environment variables to control how the container runs.
Overview
Add environment variables to the docker command, prefixing each variable that you use with -e. For example:
docker run -it -p 5900:5900 --add-host=license-server:xx.xx.xx.xx -e RUN_MODE=junit -e RUN_CMD="com.company.FTDTest" -v <full path on the host’s machine to java jars>:/tests -w /tests <OpenText Functional Testing for Developers container>
The sections below describe the environment variables you can use and their possible values.
Run commands
The following table describes variables that control the run command.
| Variable | Description | Possible values |
|---|---|---|
| RUN_MODE | Determines how to run the container. |
junit: runs a JUnit test using the class specified in RUN_CMD. testng: runs a TestNG test using the TestNG XML file specified in RUN_CMD. s/sa/standalone: runs the container in standalone mode. c/custom: runs the command specified in RUN_CMD. |
| RUN_CMD | Runs a command. |
The command to run. For RUN_MODE=junit, specify the class to run. For RUN_MODE=testng, specify the TestNG configuration XML file. For RUN_MODE=c/custom, specify the custom command you want to run. |
| VERBOSE | Determines whether to print debug information. | true |
| LFT_SAPUI5_ADDIN | Indicates loading the SAPUI addin. | true |
| NOVNC |
Indicates turning off the VNC session. The default is false. |
true |
| USER_UID | If you run docker on Linux , we recommend that you pass your user ID in order to manage the test results files. | Your user ID |
| USER_GID | (Optional) If you run docker on Linux , pass your group ID to provide group permissions. | Your group ID |
Grid configuration
The following table describes variables to use for in a grid configuration.
| Variable | Description | Possible values |
|---|---|---|
| LFT_RUN_MODE | Runs the container as a grid or a node. | grid, node. If you do not set this environment variable, the container runs an independent OpenText Functional Testing for Developers and not a grid. |
| LFT_GRID_PASSPHRASE | The encrypted case-sensitive passphrase that nodes must use when connecting to the grid. |
Provide the same passphrase for the grid and the nodes that need to connect to it. Encrypt the passphrase using the docker container machine encryption. For example:
|
Grid machine See also Configure the grid's runtime engine settings.
The following table describes variables to use on a grid machine.
| Variable | Description | Possible values |
|---|---|---|
| LFT_GRID_MAX_LIC | The maximum number of concurrent licenses the grid is allowed to consume. | Maximum number of licenses |
| LFT_GRID_LIC_TIMEOUT | The license timeout for the grid. | License timeout |
| LFT_GRID_WAIT_TIMEOUT | The maximum number of seconds to wait for one of the locks on a relevant node to be released, if all nodes are currently in use and reached their lock maximum. | Node-wait timeout |
Grid node machines. See also Grid Connection Settings.
The following table describes variables to use on grid node machines.
| Variable | Description | Possible values |
|---|---|---|
| LFT_GRID_NODE_NAME | A unique name for the grid to use for this node. | A unique name |
| LFT_GRID_ADDRESS |
The data needed for the node to connect to the grid machine. |
Use the following format: By default, |
| LFT_GRID_NODE_MAX_LOCKS | The maximum number of simultaneous times the grid can choose this node for running a test. | Maximum number of locks |
License
The following table describes variables to use for the concurrent license installation.
| Variable | Description | Possible values |
|---|---|---|
| LFT_LIC_SERVER |
The license server IP address or host name. Can be used instead of |
The license server IP address or host name. |
| LFT_LIC_ID | The license ID that you want to use. The default is 20524. | license number |
| LFT_LIC_ID_VERSION |
The license ID version. The default is 1. |
version number |
OpenText Functional Testing Lab
The following table describes variables to use to connect to OpenText Functional Testing Lab.
| Variable | Description | Possible values |
|---|---|---|
| LFT_HPEMC_ADDRESS | Use this variable along with LFT_HPEMC_USER and LFT_HPEMC_PASS to run OpenText Functional Testing Lab in the container. | The OpenText Functional Testing Lab IP address or host name. |
| LFT_HPEMC_USER | The OpenText Functional Testing Lab user name used for logging on. | The OpenText Functional Testing Lab user name. |
| LFT_HPEMC_PASS | The OpenText Functional Testing Lab password used for logging on. |
An encrypted password using the docker container machine encryption. For example: docker run -it uftdeveloper /opt/leanft/Tools/password-encoder -me <password>
|
| LFT_HPEMC_USE_PROXY | Indicates whether OpenText Functional Testing Lab runs behind a proxy. | True or False |
| LFT_PROXY_ADDRESS | The proxy IP address or host name. | IP address or host name. |
| LFTRUNTIME_labs__mobileCenter__serverInfo__ignoreCertificatesErrors |
Indicates whether or not to validate the certificate. By default, Full SSL (Strict) is employed. However, you can set this variable to True to ignore certificate errors. |
True or False |
Proxy
Use these variables if you are running behind a proxy server.
| Variable | Description | Possible values |
|---|---|---|
| http_proxy | Your organization's http proxy. | Host name or IP address and port |
| https_proxy | Your organization's https proxy. | Host name or IP address and port |
| no_proxy | Any address that does not require a proxy, such as you local host. | Host name or IP address and port |
Enable tests to access a web site using a self-signed certificate
Supported for Chrome and Firefox browsers only
Your tests may need to access a web application that requires a self-signed certificate. You can enable this by providing the certificate when running the docker container.
To provide a self-signed certificate for the Chrome or Firefox browser to use inside the docker container:
-
Place the certificate on the host machine, under the folder that you map to the docker container.
-
Add the following environment variables to the docker run commands:
Environment variable Description CERTIFICATE_FILE_PATH The internal mapped path of the certificate file in the docker container.
For example:
-e CERTIFICATE_FILE_PATH=/tests/certificate_file.crtCERTIFICATE_TRUST_ARGS (Used for Chrome only)
Parameters for managing the certificate, using the NSS Tools certutil. For details, see online documentation about this tool.
Default :
"TCu,Cuw,Tuw"For example:
-e CERTIFICATE_TRUST_ARGS="TCu,Cuw,Tuw"
For example:
docker run -it -p 5900:5900 -p 5095:5095 --add-host=license-server:xx.xx.xx.xx -e RUN_MODE=junit -e RUN_CMD="com.company.FTDTest" -e CERTIFICATE_FILE_PATH=/tests/certificate_file.crt -e CERTIFICATE_TRUST_ARGS="TCu,Cuw,Tuw" -v "/tests":/tests -w /tests functionaltesting/uftdeveloper-chrome

