Jenkins is a build management application that allows you to automate repetitive tasks like getting source code from a source code control, building projects, running automated tests, and so on.
You can run your TestComplete tests from Jenkins jobs in several ways:
By using the TestComplete support plugin.
By using the special SessionCreator command-line utility that is shipped along with TestComplete.
By running TestComplete from the command line.
The most convenient way is using the TestComplete support plugin, so we will describe it in detail in this section.
Jenkins version 2.121.1 or later.
One of the supported Windows versions must be installed on your Jenkins nodes.
TestComplete (or TestExecute) must be installed on your Jenkins nodes.
TestComplete (or TestExecute) installed on your Jenkins nodes must have access to your TestComplete (TestExecute) license.
Run TestComplete tests in Jenkins
To run TestComplete tests from Jenkins by using the TestComplete support plugin, do the following:
1. Install the TestComplete support plugin.
In Jenkins, go to Manage Jenkins > Manage Plugins.
Switch to the Available tab.
Find TestComplete support plugin and click Install without restart.
|Note:||You can also download this plugin from the Jenkins Wiki page and install it in the offline mode.|
For complete information, see Installation of the TestComplete support plugin.
2. Prepare Jenkins nodes
3. Add your TestComplete tests to Jenkins builds.
You can add your TestComplete tests in Jenkins by using Freestyle Jobs or Pipelines. Configure them as described below:
After the build is finished, you can view the results of your TestComplete tests in Jenkins on the build page. To do this open the build page in your browser and click TestComplete Test Results in the menu on the left:
For more information, see TestComplete test results for a build.
With TestComplete, you can export test results in various formats:
.tcLogX or .mht
In these formats, you can download test results on the build results page:
To download test results in the .mht format, generating MHT logs must be enabled for your tests. See the description of the Generate MHT Log File option of the TestComplete Test step or the description of the generateMHT parameter of the step for Pipeline scripts.
In this case, test results won’t be published automatically.
To view JUnit-style reports directly in Jenkins, see the description of the Generate JUnit-style report option of the TestComplete Test step or the description of the publishJUnitReports parameter of the TestComplete Test step for Pipeline scripts.
For complete information on exporting results, see TestComplete test results.
Get results via API
You can get test results from your Jenkins server by sending API requests to that server. For complete information, see Accessing TestComplete test results through APIs.
Send results to Zephyr
If you want to send results of your TestComplete tests launched from Jenkins to your reports in Zephyr, see Sending TestComplete Test Results From Jenkins to Zephyr.
If you have issues with running your tests in the latest TestComplete or TestExecute version, make sure you have updated the corresponding plugins in Jenkins. Also, we recommend that you specify the Latest version in the Advanced settings when configuring your Freestyle Jobs or directly in your Pipeline script to avoid possible problems.