Running HCL OneTest Server tests on the Jenkins server

After you install the HCL OneTest Server Jenkins plugin on the Jenkins server, you can run tests that are available in your HCL OneTest 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 HCL OneTest Server test.

    The Run HCL OneTest 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.
      Use Custom Trust Store

      Select the Use Custom Trust Store checkbox if you have used an internal CA certificate and have imported the certificate to the custom trust store.

      You can then enter the file path of your trust store followed by the file name in the Custom Trust Store Path field.

      You can select the Use Custom Password for the Trust Store checkbox if you have modified the trust store password. Enter the new password.
      Note: If you have not modified the trust store password, you can keep the Use Custom Password for the Trust Store checkbox unselected.
      Server URL Enter the URL of HCL OneTest Server. The format of the URL is as follows: https://hostname.
      Offline Token Enter the offline user token that you generated from HCL OneTest Server.
      Project Select a project from the Project list. The Project list displays the projects where you are the owner or member of HCL OneTest Server.

      Branch

      Select the branch from the Branch list. The Branch list displays the branches available in the corresponding project of HCL OneTest 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 HCL OneTest 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 HCL OneTest 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 HCL OneTest 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 HCL OneTest 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 HCL OneTest 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 HCL OneTest Server. See Test results and reports overview.