To use Jenkins to run TestComplete tests, install the TestComplete Support plugin and configure Jenkins nodes.
1. Install TestComplete Support plugin
Online installation
-
In Jenkins, go to Manage Jenkins > Manage Plugins.
-
Switch to the Available tab.
-
Start typing TestComplete in the Search text box. The page will filter out the list of available plugins as you are typing.
-
Select the TestComplete Support plugin and click Install without restart.
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 TestComplete (or TestExecute) on the Jenkins agent.
See Also
Integration With Jenkins
Configuring Jenkins Freestyle Jobs to Run TestComplete Tests
Preparing Jenkins Nodes for Running TestComplete Tests