Preparing Jenkins for Running TestComplete Tests

Applies to TestComplete 12.60, last modified on October 3, 2018

Before running tests on Jenkins, install the TestComplete Support plugin and configure your slave nodes.

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) on your Jenkins nodes must have access to your TestComplete (TestExecute) license.

1. Install TestComplete Support Plugin

Online installation

  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.

    Tip: Press Ctrl+F and search through the page for TestComplete keyword to find the plugin faster.

Offline installation

  1. Download a TestComplete Support Plugin .hpi file from the Jenkins Wiki page.

  2. In Jenkins, go to Manage Jenkins > Manage Plugins.

  3. Switch to the Advanced tab.

  4. Click Choose File in the Upload Plugin section.

  5. Select the plugin file on your device.

  6. Click Upload.

When the installation is finished, switch to the Installed tab to make sure that the TestComplete plugin was installed successfully:

2. Configure Jenkins Slave Nodes

Jenkins supports running distributed builds, so you can configure your jobs to run TestComplete tests on remote computers after the build completes.

Note: For distributed tests, we recommend using TestComplete distributed tests instead.

Before running TestComplete tests on slave computers, configure them as Jenkins nodes. We recommend using Java Web Start to connect to slave nodes, because you may encounter a large number of issues when connecting them as a windows service.

Launching Jenkins Slave Agent via Java Web Start

To connect to a node via Java Web Start, launch the Jenkins agent on the slave machine:

  1. Log on to your slave computer.

  2. On the slave computer, open the http://<Master_Name>:8080/computer/<Node_Name>/ web page in the browser:

  3. Click Launch, or launch the slave agent using the command line provided by Jenkins.

To automate the launch via Java Web start, you can install Jenkins as a service from the Jenkins slave agent:

  1. On your slave computer, launch the Jenkins slave agent as described above and click File > Install as a service:

    TestComplete integration with Jenkins: Installing Jenkins slave agent as Windows service
  2. If your tests interact with the GUI, configure your TestComplete Test build steps in your Jenkins projects to open an interactive user session in which they will run. To learn how to do that, see the description of the Run interactive user session property of the TestComplete Test build step or the description of the useTCService parameter of the step (for Pipeline script). If no interactive user session is open, your tests will fail.

Under Windows 8 and later Windows versions, TestComplete needs elevated permissions by default. The Java Web Start agent application cannot start it with needed permissions, but the service can. You can also disable support for testing Windows Store applications and launch TestComplete with user level permissions.

Another option is to add the downloaded .jnlp file to startup (you will need to add the slave agent's certificate to trusted certificates) and enable auto-login following the MSDN instructions. In this case, Jenkins will connect to the user session, so you will not have to open an interactive user session from your TestComplete Test step.

Launching Jenkins Slave Agent as Windows Service on Slave

  1. On the slave node settings page, select Let Jenkins control this Windows slave as Windows service.

  2. In the Run service as drop-down list, select Use Local System User.

TestComplete integration with Jenkins: Configuring Jenkins slave agent to run as a service

Click the image to enlarge it.

Such connection does not require any preliminary setup on the slave node. However, this method has some issues:

  • You may experience issues with connecting to the slave computer. If you do, refer to the following web page for the list of possible errors and ways to fix them:

    wiki.jenkins.io/display/JENKINS/Windows+slaves+fail+to+start+via+DCOM

  • Jenkins will run on the slave under a non-interactive system account (for instance, the Local System account). To run tests that interact with the GUI, you will have to enable the Run interactive user session option in the TestComplete Test build step or set the useTCService parameter of the step to True (for Pipeline script).

See Also

Integration With Jenkins
Configuring Jenkins Freestyle Jobs to Run TestComplete Tests
Requirements

Highlight search results