Use Azure DevOps Server or Services to trigger a local test

This topic describes how to trigger a UFT One test stored on your local machine from Azure DevOps Server (formerly known as TFS).

Note: This topic describes working with UFT One Azure DevOps extension version 5.*. To benefit from the latest functionality, we recommend updating existing tasks' versions to 5.*. When using this extension version, make sure that you installed the corresponding UFT.zip file from the ADM-TFS-Extension GitHub repository.

Run a test saved on your local machine

In Azure DevOps Server, do the following:

  1. Create a pipeline. (Note: If you are using TFS, skip this step)

    1. Create a build pipeline or a release pipeline, with the Empty job template.

      Note: A build pipeline is the pipeline type created when you do not explicitly create a release pipeline.

    2. Select the agent pool that includes the agent on which you want to run your tests.

    3. In the pipeline variables, add a UFT_LAUNCHER variable. 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 One task and place the step in the correct place in the build order.

    Note: If you are working with a release pipeline, add the task in the relevant stage, then place the step in the build.

    1. From the Task catalog, select the Test tab. A list of all available test tasks is displayed.

    2. From the Test tab, select the UFT One File System Run task and click Add. A new empty task is added as part of your build pipeline.

      Note: If you are working with a release pipeline, the task is added as part of your deployment process.

  3. Provide the following information for your build step.

    Display name

    By default, the Azure DevOps Server CI system uses a preset descriptor for the task. Provide a more meaningful name for your step.

    Tests The test, test batch file, or folder containing the tests to run. For multiple tests, the test path, name, or test result path should be separated by a comma.
    Timestamp pattern

    Define the value format of the timestamp field used for reporting in the Extensions tab.

    The default value is yyyy-MM-dd HH:mm:ss.

    Timeout

    The amount of time (in seconds) to wait if there is a problem opening or running a test. If the field is left blank, there is no timeout.

    Cancel run on first failure

    Select whether to cancel the entire job if one test in your test run failed.

    Generate 'Failed Tests' report

    Select whether to generate a report which provides information on your tests' failed steps. After the run, the report is available in the Extensions tab.

  4. (Optional) Configure the run step to upload UFT One's test result information to an Azure Storage location.

    Uploading the UFT One results to Azure Storage lets you to access the results from the Azure DevOps portal after the test run.

    Make sure you performed the steps described in Set up Azure Storage for your UFT One test results.

    Then enter the following options in your UFT One File System Run build step:

    Do you want to upload the UFT report to the storage account?

    Select Yes.

    Artifacts to upload

    Select whether to upload only the html run results report, an archive of all the UFT One result files, or both.

    Note: When running an API test we recommend uploading the archive, as the standalone html run results report does not contain any information on the captured data. The content for RequestBody and HttpRawRequest steps is available in the html file contained in the archive.

    Report file name

    Accept the default file name, which is based on the pipeline name and build number, or enter a name of your choice.

  5. To run a local mobile test, configure the Digital Lab (UFT Mobile) options.

    Server Provide the address of your Digital Lab (UFT Mobile) server, in the format of http[s]://<server name>:<port>.
    Authentication type

    Select the authentication mode to use for connecting to Digital Lab (UFT Mobile):

    • Basic authentication. Authenticate using user name and password.

    • Access key authentication. Authenticate using an access key you receive from Digital Lab (UFT Mobile).

    If you selected Basic authentication:

    • User name and Password. Enter your login credentials for the Digital Lab (UFT Mobile) server.

    • Tenant Id. Enter the tenant ID for the Digital Lab (UFT Mobile) server.

    If you selected Access key authentication:

    • Access key. Enter the access key you received from Digital Lab (UFT Mobile).

    • Use proxy settings. Select to connect using a proxy.

      Proxy Server: Specify the address of your proxy server, in the format of <proxy server name>:<port>.

      Use proxy credentials. Enables you to connect to the Digital Lab (UFT Mobile) server using a specific account.

      Proxy user name and password. The credentials used to connect to the Digital Lab (UFT Mobile) server, if Use proxy credentials is selected.

    Device

    Specify the device information of your mobile test, including DeviceID, Manufacturer, Model, OSType, and OSVersion.

    You can retrieve the values of these fields by running the UFT Mobile Get Resources task.

    If the value of DeviceID is provided, the other fields will be ignored.

    Examples:

    DeviceID: "123456789"

    Manufacturer: "Samsung", Model: "SM-G920F"

    OSType: "ANDROID", OSVersion: "7.0"

    Launch on start

    Select which app you want to launch automatically at the start of your test.

    • Home Screen: The device home screen.

    • System App: Pre-installed system application on your device, such as camera.

    • UFT Mobile App: An application hosted on Digital Lab (UFT Mobile).

    System Application. Specify the system application that you want to test on your device.

    Main UFT Mobile Application. Specify the main application that you want to test if you select UFT Mobile App.

    The value format must be Identifier: "<app identifier>", Packaged: "<Yes/No>", where Identifier is required and Packaged is optional. You can get the app identifier by running the UFT Mobile Get Resources task.

    Additional UFT Mobile Applications

    Specify additional applications that you want to test.

    The value format must be Identifier: "<app identifier>", Packaged: "<Yes/No>", where Identifier is required and Packaged is optional. You can get the app identifier by running the UFT Mobile Get Resources task.

    Install Select to install your application at the start of your test.
    Restart Select to restart your application at the start of your test.
    Uninstall Select to uninstall your application at the end of your test.
  6. 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 Instruct the CI system to stop or continue the build if there is an error on this step.
  7. Set your pipeline to run: 

    Build pipeline: Save and queue the pipeline.

    Release pipeline: Create a release and deploy the pipeline.

    When the pipeline runs, the UFT One tests run as part of the task you added.

Back to top

View the test results

After the test run, you can view the run results in the following ways:

A visual report

In the Extensions tab of the run results, you can see a report including the following parts: 

  • The UFT Report section shows the test run status, as well as links to the UFT One report and archive, if they were uploaded to Azure Storage.

  • The Run Summary shows the number of tests that ran and the percentage of each status.

  • If you selected the Generate ‘Failed Tests’ report option, the Failed Tests section shows a detailed breakdown of any failed steps.

Note:  

  • If you are working with a release pipeline, these results are available on the Stage level.

  • Sometimes, the Extensions tab is not displayed if you abort the job in the middle of the test run. Even if the Extensions tab is available and you selected the Generate 'Failed Tests' report option, the Failed Tests section is not shown.

Retrieve run result files

  • The detailed failure results are stored in JUnit format in the junitreport.xml file located in the UFTWorking/res/Report_<build run number> folder.

  • If the UFT One html report and the archive file were uploaded to Azure Storage, you can access these in the storage container.

  • If you abort a job in the middle of a test run, the results of all tests executed until the stop of the job are saved into a Results###.xml file in the %UFT_LAUNCHER%\res\Report_###\ folder.

If you run your UFT One tests from Team Foundation Server (TFS)

You can also view UFT One run results in the Summary tab of the TFS build run results.

For example:

Back to top

See also: