Integration With Jenkins

Applies to TestComplete 15.44, last modified on November 10, 2022

Video tutorial

 

About

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:

The most convenient way is using the TestComplete support plugin, so we will describe it in detail in this section.

Requirements

Jenkins

  • Jenkins version 2.121.1 or later.

Jenkins nodes

  • 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.
  1. In Jenkins, go to Manage Jenkins > Manage Plugins.

  2. Switch to the Available tab.

  3. 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
  1. Enable remote desktop connection, configure group policies, and do a few more preparatory actions. See Preparing Jenkins Nodes for Running TestComplete Tests.

  2. 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:

Configuring Jenkins Freestyle Jobs to Run TestComplete Tests

Configuring Jenkins Pipelines to Run TestComplete Tests

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:

TestComplete Jenkins integration: TestComplete test results in Jenkins

Click the image to enlarge it.

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:

TestComplete Jenkins integration: TestComplete test results in Jenkins

Click the image to enlarge it.

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.

JUnit report

To export test results in the JUnit report format, use the /ExportSummary command-line argument of your TestComplete Test step.

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.

Remarks

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.

See Also

Working With TestComplete

Highlight search results