To run your LoadComplete tests as part of a Jenkins Pipeline job, create a Pipeline script. The script will include statements that will start your LoadComplete test. It may also include statements that will perform other tasks, (for instance, they may copy LoadComplete project files to a working folder).
Create a Pipeline script
In the Pipeline section, choose Pipeline script from the Definition drop-down list.
In the Script edit box, specify Pipeline script statements that will run a LoadComplete test.
For instance, the script below launches LoadComplete 4 and runs the Order test of the Basic project.
loadcompletetest executorVersion: '4', project: 'Basic Test Project\\Basic.ltp', test: 'Order'
If you are not familiar with script writing, you can use the Jenkins Snippet Generator. It allows specifying task settings to generate a script that will perform the task automatically. You can copy the script and paste it to the Script edit box:
Click the Pipeline Syntax link.
The Snippet Generator window will appear.
In the Sample Step drop-down list, select loadcompletetest: LoadComplete Test.
Specify your test project in the Project field.
Note: The path should be relative to the job’s working folder on the node.
In the Test name field, specify the name of the test to run.
Click Advanced to configure the following additional settings of the LoadComplete Test step:
Option Description LoadComplete version Specifies the LoadComplete version to be used in case several versions of the product are installed on the node. Jenkins uses the latest installed version by default. Action on warnings Specifies whether Jenkins should mark the entire build as failed or unstable when the LoadComplete test log contains warnings. Action on errors Specifies whether Jenkins should mark the entire build as failed or unstable when the LoadComplete test log contains errors. Use test timeout Specifies the maximum test execution time in seconds. The timeout includes both the startup time of LoadComplete and the test run time. If the test is not finished until the specified period elapses, Jenkins will mark the entire build as failed. Generate PDF log file If this option is enabled (by default), LoadComplete exports test results to a .pdf file after the build is over. You can download this file from the Jenkins page displaying test results. If this option is disabled, LoadComplete does not export test results in the PDF format, but you can still view the results in Jenkins. See Viewing LoadComplete Test Results in Jenkins. Generate MHT log file If this option is enabled, LoadComplete exports test results to a .mht file after the build is over. You can download this file from the Jenkins page displaying test results. If this option is disabled (by default), LoadComplete does not export test results in the PDF format, but you can still view the results in Jenkins. See Viewing LoadComplete Test Results in Jenkins.
Click Generate Pipeline Script. Jenkins will generate the Pipeline script. You can then copy and paste it to the Script edit box of your Pipeline job.