Use Azure DevOps Server to trigger a test from ALM Lab Management

This topic describes how to add Azure DevOps Server build steps to first prepare the ALM Lab Management environment, and then trigger a UFT functional test from the ALM Lab Management module.

Prepare the ALM Lab Management environment

Prepare the ALM Lab Management environment before running UFT tests saved in ALM, as part of a test set or build verification suite from the Test Lab Module in ALM.

In Azure DevOps Server, do the following:

  1. 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.

  2. Add a UFT task or build step, in the correct place in the build order.

  3. In the Task catalog, select the Test tab. A list of all available test tasks is displayed:

  4. From the Test tab, select the UFTALM Lab Management Environment Preparation task and click Add. A new, empty task is added in red as part of your build plan:

  5. Click Close to edit your build step.

  6. Provide the following information for your task:

    Description (optional)

    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.

    ALM server

    The ALM server from which to run the test.

    The ALM server address must be in one of the following formats:

    • http://<ALM server name>
    • IP:port/qcbin

    You may also need to connect to ALM using common registration mode. If this is the case, enter the URL using one of the following formats:

    • http://<ALM server name>
    • IP:port/qcbin/start_a.jsp?common=true
    ALM Credentials

    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.
  7. Expand the Advanced settings and specify one of the following:

    Create a new configuration named

    Enter a name for the configuration.

    If you select this option, enter the values in the specified fields.

    Use an existing configuration ID Enter the ID of your AUT Environment configuration in ALM .

    For details on the available options, click the question icon to the next of the option.

  8. Expand the Parameters section and enter the AUT Environment parameters you want to update for the configuration.

    You are limited to 10 parameters for this task. If your test sets include more than 10 parameters, add another step.

    Note: You must select each parameter individually (one-by-one), and specify the parameter details.

    Not selecting or providing a parameter value for any parameter will cause the specified parameters to not be used.

  9. 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

This configuration will be used as a build step in the appropriate place.

Continue with Trigger a UFT test from ALM Lab Management.

Back to top

Trigger a UFT test from ALM Lab Management

After preparing the ALM Lab Management environment, add another Azure DevOps Server build step to trigger your UFT test.

Do the following:

  1. In your build, add an additional build step and place the step in the correct place in the build order.

  2. In the Task catalog, select the Test tab. A list of all available test tasks is displayed:

  3. From the Test tab, select the UFT ALM Lab Management task and click Add.

    A new, empty task is added in red as part of your build plan:

  4. Provide the following information for your task:

    ALM credentials

    The general information for the tests, including the ALM server information, and the Test Lab identification information.

    You may also need to connect to ALM using common registration mode. If this is the case, enter the URL format as one of the following:

    • http://<ALM server name>
    • IP:port/qcbin/start_a.jsp?common=true
    Test set / Build verification suite ID

    The ID of the test set or build verification suite you want to run.

    The test set must be of type Functional.

    Timeslot

    (in minutes, Minimum=30)

    The amount of type needed on the host, or slave, to run the test set or build verification suite.

    CDA provisioning information

    The details for CDA provisioning on the ALM server.

    For details on an individual option, click the Information bubble next to the option.

    For more details, see the ALM Help Center.

  5. 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
  6. Run the build step. When the build runs, the test runs as a build task with the specified settings.

Back to top

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.

For example:

Back to top

See also: