Run UFT One tests in a Bamboo server build

Add UFT One 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 One tests

Trigger a local UFT One 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 One File System Execution task.

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

  3. Configure the following details for your UFT One 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.

    Optionally, specify test parameters to pass to each test in the test batch file.

    You can also list the same test multiple times, each time with different parameters.

    Give your batch file an .mtbx extension, and use the following sample syntax:

    <Mtbx>
     <Test name="test1" path="c:\tests\APITest1">
     <Parameter name="A" value="abc" type="string"/>
     ….
     </Test>
     <Test name="test2" path="${WORKSPACE}\test2">
      <Parameter name="p1" value="123" type="int"/>
      <Parameter name="p4" value="123.4" type="float"/>
      ….
     </Test>
    </Mtbx>
    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 run results

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

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

    • Do not archive test reports: No run 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 Digital Lab (UFT Mobile), see Integrate mobile tests and Bamboo section of the UFT One 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 run results.

    The run result file name includes a timestamp of the run, which matches the Bamboo system variable bamboo.buildTimeStamp. This enables you to more easily refer to a specific result file in an automation script.

View UFT One test run results

After a test run, UFT One automatically saves the run results to a selected location. Specify run results specific settings in the Run Sessions pane of the UFT One 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.

    The run result file name includes a timestamp of the run, which matches the Bamboo system variable bamboo.buildTimeStamp. This enables you to more easily refer to a specific result file in an automation script.

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 One tests from ALM

Use Bamboo to trigger a UFT One 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 UFT One ALM 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.

    ALM Connectivity

    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 (ALM 15.0 or later, UFT One Bamboo add-on version 1.6 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 One 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. 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 One computer.

    • Run remotely: Runs the test on a remote UFT One 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.

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

    We recommend that you run functional test sets from ALM Lab Management. The following limitations exist when running them from ALM:

    • Functional test sets are not supported to run on a planned host.

    • You can only get run results of each test when running functional test sets on a local or remote host.

  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 run results.

    The run result file name includes a timestamp of the run, which matches the Bamboo system variable bamboo.buildTimeStamp. This enables you to more easily refer to a specific result file in an automation script.

  5. View the test run results.

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

Back to top

Run UFT One tests from the ALM Test Lab

Use Bamboo to trigger a UFT One 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 UFT One ALM 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.

    ALM Connectivity

    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 (ALM 15.5 or later, UFT One Bamboo plugin version 1.6 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 One 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.

    The selected project should be enabled for Server Side Execution of UFT One 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 run results.

    The run result file name includes a timestamp of the run, which matches the Bamboo system variable bamboo.buildTimeStamp. This enables you to more easily refer to a specific result file in an automation script.

Back to top

Security precaution

Although any sensitive information is encrypted and encoded, Micro Focus encourages you to routinely remove unnecessary configuration files generated by your Bamboo jobs, which are not removed by the Micro Focus Bamboo CI plugin.

These are the files located in the <Bamboo home directory>\xml-data\build-dir\<job name> folders.

By not implementing the file removal you may expose your system to increased security risks. You understand and agree to assume all associated risks and hold Micro Focus harmless for the same.

It remains at all times the Customer’s sole responsibility to assess its own regulatory and business requirements. Micro Focus does not represent or warrant that its products comply with any specific legal or regulatory standards applicable to Customer in conducting Customer's business.

Back to top