Creating a pipeline script from Jenkins

You must create a pipeline script to run test assets from the Jenkins Pipeline project.

Before you begin

You must have completed the following tasks:

Procedure

  1. Open the Jenkins Pipeline project on the Jenkins Dashboard, and then click Configure.
  2. Select the Pipeline tab.
  3. Click Pipeline Syntax to generate a pipeline script.
  4. Select the step: General Build Step option from the drop-down list in the Sample Step field.
  5. Select Run Integration Tester Tests option from the Build Step list.

    The build step is displayed.

  6. Enter values for the following fields:
    Field Value
    Installation directory Enter the path to the installation directory of Test Integrations and APIs.
    Project Enter the path to the folder containing the project and the name of the project
    Environment Enter the name of the environment that is configured in the project.
    Tests Enter the name of the test that you want to run.

    If you leave the Installation directory blank, the following environment variables are queried during runtime to find the directory:

    INTEGRATION_TESTER_AGENT_HOME and INTEGRATION_TESTER_HOME.
    Note: In HCL DevOps Test Integrations and APIs (Test Integrations and APIs) 10.2.2 or later, the environment variables INTEGRATION_TESTER_HOME and INTEGRATION_TESTER_AGENT_HOME are automatically created at the time of installing the product software.

    The job fails if the value is blank. These variables must be visible to the user or the service account that is running the Jenkins primary or secondary server. If you update either of the environment variables, you must restart the Jenkins primary or secondary server for the values to take effect.

  7. Click Advanced to view and update the other fields that are relevant for the test.
  8. Click Generate Pipeline Script.

    The pipeline script for the build step is created.

Results

You have created the script that you can use in your Pipeline project to run the build step.

What to do next

You can configure your Pipeline project to use the scrip that you created to run tests from the Jenkins server. See Running tests from Jenkins.