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:
-
Installed the HCL OneTest™ UI - Functional Test on the Jenkins primary server. See Installing the plugin on the Jenkins primary server.
-
Created a Jenkins Pipeline project.
Procedure
- Open your Jenkins Pipeline project from the list.
- Click Configure, and then select the Pipeline tab.
- Click Pipeline Syntax to generate a pipeline script.
- Select the step: General Build Step option from the drop-down list in the Sample Step field.
- Select the Run an HCL OneTest UI - Functional Test option from the drop-down list in the Build Step field.
-
Provide the details about the test run for the fields in the following
table:
Field Description Name Required. The name of the HCL OneTest™ UI test. Project Directory Required. The fully qualified path to the HCL OneTest™ UI project directory. You must use '\\' or '/' as the file separator. Script Name Required. The name of the script to be run. Log Format Optional. The format of the script run logs. The avaiable options are as follows: - Default
- none
- json
- xml
- html
- TPTP
- Text
Iteration Count Optional. The number of dataset iterations to be run. User Arguments Optional. Additional playback arguments, if any. For multiple arguments, you must enclose each argument within double quotation marks and separate the arguments by providing a space between them. For example, "password" "7891230" "20". Project Dependencies Optional. The complete path to the project that your test depends for the run. If there are multiple projects, you must separate each project path with a semicolon. -
Click Generate Pipeline Script and copy the script that
you created for the build step to use it in the sample script.
Note:
You need this generated script to enter in step 5.c in the following topic:
Configuring the Pipeline project by using the sample script