Integration With Jenkins

Applies to TestComplete 14.72, last modified on April 22, 2021

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 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.
  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 Requirements for slave nodes.

  2. Configure slave computers as Jenkins nodes and launch the slave agent. For complete information, see Configuring Jenkins slave 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

Test results

View 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.

Export results

With TestComplete, you can export test results in various formats:

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.

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.

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.

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
Distributed Testing - Basic Concepts

Highlight search results