Before running tests on Jenkins, you need to install the TestComplete Support plugin and configure Jenkins nodes.
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 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.
1. Install TestComplete Support Plugin
Online installation
-
In Jenkins, go to Manage Jenkins > Manage Plugins.
-
Switch to the Available tab.
-
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
-
Download a TestComplete Support Plugin .hpi file from the Jenkins Wiki page.
-
In Jenkins, go to Manage Jenkins > Manage Plugins.
-
Switch to the Advanced tab.
-
Click Choose File in the Upload Plugin section.
-
Select the plugin file on your device.
-
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 nodes
Jenkins supports running distributed builds, so you can configure your jobs to run TestComplete tests on remote computers. To do this, run the Jenkins agent on remote computers and connect them to Jenkins to register them as Jenkins nodes.
Adding nodes to Jenkins
-
In Jenkins, go to Managing Jenkins > Manage Nodes and Clouds.
-
Click New Node.
-
Enter the name for the new node.
-
Click Permanent Agent.
-
Click OK.
-
In the Remote Root Directory text box, enter the path to the folder on the remote computer, that will be used as a working folder for the Jenkins agent.
-
Specify other parameters, if needed.
-
Select the Launch agent by connecting it to the master launch method.
-
Click Save.
Launching Jenkins agents on nodes and connecting them to Jenkins
-
Log in to the computer to be used as a Jenkins node.
-
On the node, run a web browser and open the Manage Nodes page of Jenkins:
http://<jenkins_server>/computer
-
Click the target node in the list.
-
Follow the provided instructions to start the Jenkins agent on the node and connect it to Jenkins:
-
(Optional) To run the agent as a service, in the Jenkins agent window, click File > Install as a service:
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 a Pipeline script).If no interactive user session is open, your tests will fail.
To run tests without opening an interactive user session (for example, if they do not interact with the GUI), disable UI accessibility in TestExecute on the Jenkins agent.
See Also
Integration With Jenkins
Configuring Jenkins Freestyle Jobs to Run TestComplete Tests
Preparing Jenkins Nodes for Running Tests