Use Azure DevOps Server to trigger a test saved in ALM
This topic describes how to run a UFT test saved in ALM.
Run a test saved in ALM
In Azure DevOps Server, do the following:
Create a pipeline (Note: If you are using TFS, skip this step).
- Use the Default agent pool.
- In Variables, add the UFT_LAUNCHER variable and select the checkmark to make it Settable at queue time. The variable's value should be the full path to the UFTWorking folder.
For more details, see the Microsoft Azure documentation.
Add a UFT task or build step, in the correct place in the build order.
In the Task catalog, select the Test tab to view a list of all available test tasks.
Select the UFT ALM Execution task, and click Add. A new, empty task is added in red, as part of your build plan.
Click Close to edit your build step. Provide the following details for your task:
By default, the Azure DevOps Server CI system uses a preset descriptor for the task.
Click Rename to provide a more meaningful name for your step.
The ALM server where your test is saved. Use the following syntax:
http://<ALMserver name> or IP:port/qcbin
You may also need to connect to ALM using common registration mode.
If this is the case, enter the URL format as http://<ALMserver name> or IP:port/qcbin/start_a.jsp?common=true.
Depending on the authentication type required by your ALM server, credentials can be a username and password or an API key for SSO authentication.
Username and password:
User name: The ALM user name to use to access the server.
Password: The password for the ALM user specified above.
SSO authentication (UFT 15.0.1 or later, ALM 12.60 or later):
Select SSO enabled.
Enter the Client ID and API key secret obtained from your ALM site administrator.
Ensure that the ALM user or client specified in this task has the correct permissions to open and run the UFT tests.
For details on permissions, see the ALM Help Center.
Domain The domain in the ALM server where the project containing the tests is stored. Project The project containing the tests. Test sets
The test sets to run with this build task. Provide a full ALM path to these test sets.
Each line in this field can contain a test set or folder.
The amount of time (in seconds) to wait if there is a problem opening or running the test.
If the field is left blank, there is no timeout.
The manner of running the test. Options include:
- Run locally
- Run remotely
- Run on a planned host
Testing tool host The address of the host containing the testing tool.To hide sensitive information in Azure
To hide information such as the ALM password or the SSO credentials, define Azure task variables for this information and lock them:
Create the variable:
In the task's Variables tab add a variable for each field whose value you want to hide.
Enter the value for the variable, select the lock option.
Tip: Optionally, select Settable at queue time too, to enable editing this value when queueing the build.
For example, create a
MyPasswordvariable and enter your ALM password as its value.
Link your variable to the relevant field in the task:
In the Tasks tab, click Link settings.
In Setting to link, select the field to link to the variable, and in Value, enter $(<variable name>). Click Link to complete the process.
For example, select the Password field and enter
Configure the CI system control options for the step, including:
Enabled Specify whether the step should be run as part of this build. Continue on error Instructs the CI system to stop or continue the build if there is an error on this step. Always run Instructs the CI system to always run this step.
Run the build step. When the build runs, the test runs as a build task with the specified settings.
Note: If you manually stop the build from the Azure DevOps server, the UFT process remains in use and you are unable to continue running the test by connecting to ALM.
To fix this, manually stop the UFT.exe and UFTRemoteAgent.exe process and resume the build from the Azure DevOps server.
View the test results
UFT automatically saves a link to the run results on ALM as an artifact with the build.
View this link on the Summary tab of the run results.