Running IBM® Rational® Test Automation Server tests in an Azure DevOps Pipeline

After you install the HCL OneTest Studio extension in your organization, you can run tests that are available in IBM® Rational® Test Automation Server as a job in Azure DevOps pipelines.

Before you begin

You must have completed the following tasks:

About this task

After you add the HCL OneTest Studio extension in your Azure DevOps organization, you can use an existing pipeline or create a new one to add Rational® Test Automation Server test tasks. You can install an agent or use the one that you installed in your default agent pool. You can add Rational® Test Automation Server tests as tasks to your agent job, configure the task, and then run the task in the Azure DevOps pipeline.

Procedure

  1. Open your Organization page in Azure DevOps and perform the following steps:
    1. Click the project you want to use.
    2. Initialize the repository by performing the following steps:
      1. Click Repos from the left pane.
      2. Click Initialize from the Initialize with a README or gitignore section.
        Note: Select the Add a README checkbox if it is not selected.
    3. Click Pipelines from the left pane.
    4. Click Create Pipeline.
    5. Click Use the classic editor to create a pipeline without YAML.
    6. Verify the project, repository, and branch for manual and scheduled builds, and then click Continue.
    7. Click Empty job.
  2. Select Pipeline and complete the following steps:
    1. Change the name for the build pipeline if required.
    2. Select the Agent pool for your build pipeline.

      You can use the agent from the default agent pool or use the one you have installed.

    3. Select the Agent Specification for the agent if required.
  3. Add a task to the agent job by completing the following steps:
    1. Click the Add Task icon Add Task icon in Azure DevOps for the agent job.

      The Add tasks pane is displayed.

    2. Search for the HCL tasks defined in the HCL OneTest Studio extension.

      The tasks that you can select are displayed.

      HCL Task selection in Azure DevOps

    3. Select the IBM® Rational® Test Automation Server Task, and then click Add to add the task to the agent job.

      The selected task is added to the agent job and it is displayed with a warning that some settings require attention. You must configure the settings mentioned in step 4.

      You can also remove the tasks that are not required in your job. Select the tasks in the list that you want to remove. You can then right-click the tasks, and click Remove selected task(s) to remove them.

  4. Configure the settings by performing the following steps:
    1. Select the task version from the list if required.
    2. Follow the action for the task by referring to the following table:
      Note: All mandatory fields are marked with an asterisk (*) in the UI.
      Field Action
      Display name Enter a name of the task.
      IBM® Rational® Test Automation Server service connection

      Select the service connection from the drop-down list.

      If you are selecting the IBM® Rational® Test Automation Server service connection for the first time, you must click New to add the following details to add an IBM® Rational® Test Automation Server service connection, and then save the connection details:
      • Server URL - Enter the URL of Rational® Test Automation Server. The format of the URL is as follows: https://hostname.
      • Offline Token - Enter the offline token that you generated from Rational® Test Automation Server.
      • Service connection name - Enter a service connection name.
      • Description (optional) - Enter the details of the service connection if required.
      • Optionally, select the Grant access permission to all pipelines checkbox if required.
      You can save the service connection details. The service connection is available for selection from the IBM® Rational® Test Automation Server service connection drop-down list.
      Note:

      You can edit or delete the service connection that you added if required. Click Manage, and then select the service connection from the Service connections list to open the service connection. You can click Edit to edit the service connection details. If you want to delete an existing service connection details, click the Vertical ellipsis icon, and then click Delete to delete the service connection details.

      Optionally, you can also create, edit, and delete a service connection from your Azure DevOps project dashboard. Open your project, click Project settings > Service connections, and then perform any of the following tasks:
      • Create a new service connection.
      • Edit or delete an existing service connection that you already added.
      Project Enter the name of the project containing the test.
      Branch Select the branch where the test assets are stored.
      Repository link Enter the repository path that is configured for the project that contains the test to run.
      File path Enter the path of the test in Rational® Test Automation Server that you want to run.
      API Test Environment Enter the name of the environment that is configured in the test asset for the test created in Rational® Integration Tester.
      Note: This setting is applicable only if you are running an API suite test.
    3. Expand Control Options and configure the settings for your task if required.
    4. Expand Output Variables and configure the settings for your task if required.
  5. Select from the following options:
    1. Click Save to save the configured settings for the task.
      Note: The task is not queued for a run.

      You can save the task to a build pipeline and opt to run the build at a later time.

    2. Click Save & queue to save the configurations and queue the run in the pipeline.

      The Run pipeline dialog box is displayed.

  6. Complete the following steps:
    1. Enter a comment for the test in the Save comment field.
    2. Select the agent that you configured for the test from the Agent pool list.
    3. Select the agent specification from the Agent Specification list if required.
    4. Select the branch from the Branch/tag list.
    5. Add the variables and demands for the task run from the Advanced Options pane if required.
    6. Select the Enable system diagnostics checkbox for a detailed log view.
    7. Click Save and run.

      The pipeline summary page displays the progress of the job run.

Results

You have run the tests for the application you are testing, in the Azure DevOps pipeline.

What to do next

You can open the job to view the task logs from the pipeline summary page.

You must click the task to open the Task page to view the test results. The Reports information section on the Task page displays the names of the report along with its corresponding URLs. The report URLs are the Rational® Test Automation Server URLs where the reports are stored. You can access the report URLs to view the test execution information at any point of time.

You can also view the test reports and logs of the test that was run on the Azure DevOps from the Results page on Rational® Test Automation Server. See Test results and reports overview.