Run UFT tests in a Bamboo server build

Add UFT tests to a Bamboo server build process by adding them as build tasks from the build job. Before you start you must have a build project, plan, and job already created.

Run local UFT tests

Trigger a local UFT test run from Bamboo.

Do the following:

  1. In your Bamboo build plan, add an additional task.

  2. In the task types window, open the Tests pane and select the UFT File System Execution task.

    A new, empty task is added as part of your build plan.

  3. Configure the following details for your UFT File System Execution task:

    Task description (optional) A description to understand the purpose of the task.
    Tests

    The tests, test batch file, or folder containing tests to run.

    Each line in this field should contain the path to a test, test batch file (.MTB file name), or folder on the machine where the tests are to be run.

    You can enter multiple tests as needed.

    Timeout

    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.

    Archive and publish test results

    Instructs the server what to do with the test results after the test run is complete. Select one of the following:

    • Always archive test reports. Saves all test results, both for passed and failed tests.

    • Do not archive test reports: No test results are saved, regardless of the test status.

    • Archive test reports for failed tests: Only results for failed tests are saved.

    Note: If you are running tests via Mobile Center, see Integrate mobile tests and Bamboo section of the UFT Help Center.

  4. When you're done, save your configuration.

    When the build runs, the test will run as a build task with the specified settings. A new artifact is added in the Artifacts tab of the build project.

    After the test run, the relevant build logs are saved in the Logs tab of the build execution results. You can view details about the test run and links to test results.

View UFT test results

After a test run, UFT automatically saves the run results to a selected location. Specify run results specific settings in the Run Sessions pane of the UFT Options dialog box (Tools > Options > General tab > Run Sessions node).

To view the run results, do the following

  1. In the Artifacts tab, click the appropriate artifact link to download the report.

  2. Unzip and open the run results file, then do one of the following options:

    • Open the run_results.html file to view the run results.

    • In the Run Results Viewer select and open the Results.xml file.

If you added multiple test tasks, the different tasks are differentiated by their 3-digit ID at the beginning of the task. You can see these when you view the artifacts in the Artifacts tab.

For example:

Back to top

Run UFT tests from ALM

Use Bamboo to trigger a UFT test run for a test stored in ALM.

Do the following:

  1. In your build plan, add an additional task.

  2. In the task types window, open the Tests pane and select the UFTALM Execution task.

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

  3. Provide the following information for your task:

    Task description (optional) A description to understand the purpose of the task.

    ALM Server

    The ALM server from which to run the test.

    The ALM server address must be in the format: http://<ALM server name or IP>:<port>/qcbin.

    User name

    The ALM user name to use to access the server.

    Ensure that the ALM user specified in this task has the correct permissions to open and run the UFT tests.

    For details on permissions, see the Application Lifecycle Management Administrator Guide.

    Password The password for the ALM user specified above.
    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. You should provide a full ALM path to these test sets.

    Each line in this field can contain a test name or folder.

    Timeout

    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.

    Advanced Settings

    You can specify the Run mode in one of the following locations:

    • Run locally: Runs the test on the same computer as the build

    • Run on planned host: Runs the test (as part of a scheduled test run) on a remote UFT computer

    • Run remotely: Runs the test on a remote UFT computer (not a scheduled run)

    If you select one of the remote computer options, specify the host on which you want to run the test.

    In order to run on the remote computer, you must set the Allow other Micro Focus products to run tests and components option in the Test Runs pane of the Options dialog box (Tools > Options > GUI Testing tab > Test Runs tab).

  4. Save the existing configuration.

    When the build runs, the test will run as a build task with the specified settings.

    After the test run, the build logs relevant to the test run task can be found in the Logs tab of the build execution results. You can view details about the test run and links to test results.

  5. View the test results.

    After a test run, UFT automatically saves the run results to your Bamboo server. In the Build Artifacts, you can view a html file with a link to the test run in your ALM project:

Back to top

Run UFT tests from the ALM Test Lab

Use Bamboo to trigger a UFT test run for a test in the ALM Test Lab.

Do the following:

  1. (Optional) You may want to configure the environment details for the application being tested before you run the test. To do this, add an additional build task to your build plan.

    For details, see Configure the application environment.

  2. In your build plan, add an additional task.

    In the task types window, open the Tests pane and select the UFTALM Lab Management task.

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

  3. Provide the following information for your task:

    Task description (optional) A description to understand the purpose of the task.
    ALM Server

    The ALM server from which to run the test.

    The ALM server address must be in the format: http://<ALM server name or IP>:<port>/qcbin.

    User name

    The ALM user name to use to access the server.

    Ensure that the ALM user specified in this task has the correct permissions to open and run the UFT tests.

    For details on permissions, see the Application Lifecycle Management Administrator Guide.

    Password The password for the ALM user specified above.
    Domain The domain in the ALM server where the project containing the tests is stored.
    Project

    The project containing the tests.

    The selected project should be enabled for Server Side Execution of UFT tests.

    For details on Server Side Execution, see the Application Lifecycle Management User Guide.

    Run type

    Select one of the following types of runs:

    • Test set

    • Build verification suite

    For more details about test steps and build verification suites, see the Application Lifecycle Management User Guide.

    Test Set/Build Verification Suite ID

    The ALM ID of the selected test set or the build verification suite ID.

    If you select a test set, your test set should be a functional test set, and must be prepared for Server Side Execution.

    For details, see the Application Lifecycle Management User Guide

    Description The description of the test set or build verification suite (as entered in ALM).
    Timeslot Duration The duration of the slot reserved for a scheduled run of the test set or build verification suite.
    Environment Configuration ID

    The ID of your application environment configuration, as entered in ALM.

    To find this ID, in ALM, right-click the entity, copy the URL, and paste it to a text editor.

    Use the number associated with the EntityID at the end of the URL.

  4. Save the configuration.

    When the build runs, the test will run as a build task with the specified settings.

    After the test run, the relevant build logs are saved in the Logs tab of the build execution results. You can view details about the test run and links to test results.

Back to top