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 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.
Security settings and group policies on Jenkins nodes must allow remote connections as described in Preparing Jenkins Nodes for Running TestComplete Tests.
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.
How it works
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
Enable remote desktop connection, configure group policies, and do a few more preparatory actions. See Preparing Jenkins Nodes for Running TestComplete Tests.
Configure remote computers as Jenkins nodes and launch the Jenkins agent on them. For complete information, see Configuring 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:
4. Get test results
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.
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.
5. (Optional) Export test results
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.
Send results to Zephyr
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.