Running IBM® Rational® Test Automation Server tests on the Jenkins server

After you install the Rational® Test Automation Server Jenkins plugin on the Jenkins server, you can run tests that are available in your IBM® Rational® Test Automation Server project on the Jenkins server.

Before you begin

You must have completed the following tasks:

Procedure

  1. Login to the Jenkins server, if you are not already logged in.
  2. Open your Jenkins free-style software project.
  3. Click Configure.
  4. Click the Build tab.
  5. Click Add build step, and then click Run IBM® Rational® Test Automation Server test.

    The Run IBM® Rational® Test Automation Server test pane is displayed.

    1. Provide details about the test run by referring to the following table.
      Field Description
      Name Enter a name for the Jenkins build step.
      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 user token that you generated from Rational® Test Automation Server.
      Project Select a project from the Project list. The Project list displays the projects where you are the owner or member of Rational® Test Automation Server.

      Branch

      Select the branch from the Branch list. The Branch list displays the branches available in the corresponding project of Rational® Test Automation Server.
      Note: After you select the branch from the Branch list, if you want to change the URL, offline user token, or the project in the Build, then you must close the build step. Then you must click Add build step, select Run IBM® Rational® Test Automation Server test, and then enter the details.
      Asset Type Select the test asset type of the test that you want to run from the Asset Type list. The available asset types are as follows:
      • AFTSUITE
      • COMPOUND
      • VUSCHEDULE
      • RATESCHEDULE
      • APISUITE
      Note: The test environment is mandatory if you select APISUITE as an asset type to run an API suite.
      Test
      Select the required test from the Tests list. The Tests list displays the available test assets from the corresponding branch in the selected project, test asset path, and the repository (that the test belongs to) from Rational® Test Automation Server based on the type of the test asset you selected from the Asset Type list.
      Note: After you select the test details from the Tests list, if you want to change the URL, offline user token, or the project in the Build, then you must close the build step. You must then click Add build step, select Run IBM® Rational® Test Automation Server test, and then enter the details.
      Test Environment
      This field is mandatory only if you are running an API suite test. Based on the asset type as APISUITE and test from the Tests list that you select, the Test Environment list displays the available test environments from Rational® Test Automation Server.
      Note: The following message is displayed when you select any other asset type apart from APISUITE in the Asset Type field: You can select Test Environment only if you are running tests of type APISUITE.
    2. Click Save to save the build step.
    3. Optionally, you can run multiple tests sequentially in the same job by adding multiple build steps and provide details for the tests that you want to run.
  6. Click Build Now from the left pane to run the test on the Jenkins server.

Results

The Jenkins dashboard shows the progress of the test run.

What to do next

After the Jenkins build completes, you can view the test results. You can click the build number from the Build History pane on the Jenkins dashboard. You can then click Console Output to view a detailed log of the build from the console output.

The Test Result displays the status of the completed test that you ran.
Note: If you add multiple build steps to run multiple tests, multiple Test Result instances are displayed.

The Reports information section 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 Jenkins server from the Results page on IBM® Rational® Test Automation Server. See Test results and reports overview.