functionaltesting/uft_lite_utils
Use the UFT One Utility Docker image to speed up your API test runs.
To distinguish the UFT One Utility Docker image from the existing clean GA image (uft-lite image) on the Docker hub, the name of a UFT One Utility Docker image ends with a special tag -utils-. This tag specifies the version of the utility tools installed in the new image. For example, the name of a new UFT One Docker image is uft_lite:15.0.2-utils-v1.0, which represents a UFT lite docker image with UFT 15.0.2 and utility tool v1.0 installed.
Latest: The latest version of UFT One and the utility tools
<UFT_Version>: The latest utility tools and a specific UFT One version. For Example, the '2021' tag indicates the utility image was generated on top of UFT One 2021, where 2021 is the version of UFT one.
<UFT_version>-v<utility_version>: Specific UFT One and utility version. For Example, the '2021-v1.0r8' tag indicates the utility image was generated on top of UFT One 2021, and the utility tools version is v1.0r8.
To run API tests by using the UFT One Utility Docker image, you need to:
Install and set up Docker on your computer so it can pull Docker images from the Docker Hub. This sets up your computer as a docker host.
In a command window on the host computer, run the following command:
docker pull uft_lite_utils:latest
To run a UFT One API test in a new docker container created based on the new image, run the following command in the command window on the host computer:
docker run --rm -v "<folder-on-host>":"<folder-on-container>" functionaltesting/uft_lite_utils:latest run-api.cmd –l <license> -s <test> -p <report-folder> -j <junit-report>
To run multiple UFT One API tests in a new docker container created based on the new image, run the following command in the command window on the host computer:
docker run --rm -v "<folder-on-host>":"<folder-on-container>" functionaltesting/uft_lite_utils:latest run-api.cmd –l <license> -tests <tests> -reports <reports-folder> -junits <junit-reports>
Both commands create a docker container, install the concurrent license, and then run the API tests in the created container.
Parameter Name | Description |
---|---|
<folder-on-host> | The full path to the API test on the host computer. This folder is mounted to the <folder-on-container> location on your Docker container. |
<folder-on-container> | The full path to the folder on your Docker container where the <folder-on-host> is mounted. |
-l <license> | The concurrent license of UFT One. You can run the following command to get available concurrent license IDs and versions: docker run --rm functionaltesting/uft_lite:<UFT One version>-utils-<version> license-list.cmd <license-server> |
-s <test> | (Optional) The local folder that contains the test script to be run. The default value is C:\test\script if this parameter is left empty or the -s option is omitted. |
-p <report-folder> | (Optional) The local folder that contains the generated test report after the test run. The default value is C:\test\report if this parameter is left empty or the -p option is omitted. |
-j <junit-report> | (Optional) The local file converted to the JUnit report XML format after the test run. The default value is C:\test\report\junit_results.xml if this parameter is left empty or the -j option is omitted. |
-tests <tests> | (Optional) The local folder that contains multiple API test scripts to be run. The default value is C:\test\scripts if this parameter is left empty or the -tests option is omitted. |
-reports <reports-folder> | (Optional) The local folder that contains the generated test reports after the test run. The default value is C:\test\reports if this parameter is left empty or the -reports option is omitted. |
-junits <junit-reports> | (Optional) The local folder that contains the converted JUnit test reports after the test run. The default value is C:\test\reports if this parameter is left empty or the -junits option is omitted. |
-t <timeout> | The number of seconds before the test run times out. The default value is 3600 seconds (1 hour) if this option is omitted or not set. |
-r | If specified, the test will be run again once an error is reported. |
-h | Show the help. |
For example, if your host test folder is C:\DockerProject\tests, and your test script is saved in the C:\test\script, you can run the following command to run the API test and get a JUnit report:
docker run --rm -v "C:\DockerProject\tests":"C:\test" functionaltesting/uft_lite_utils:latest run-api.cmd -l 10594 1 11.11.111.111:5814
This command creates and runs a UFT docker container, mounts the host test folder C:\DockerProject\tests to the local container folder C:\test, installs a concurrent license, and runs the API test in the default test folder C:\test\script, and generates a test report and a JUnit report in the C:\test\report folder.
docker pull functionaltesting/uft_lite_utils