Requirements

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

To run TestComplete tests from Jenkins, the following requirements must be met:

After configuring your Jenkins nodes, make sure that when you connect to them, no additional login screens or account selection windows appear.

Enable Remote Desktop connections

By default, your computer will prohibit remote connections. To connect to a slave machine using Jenkins under the specified user session:

  1. On your slave machine, set the System properties > Remote > Remote Desktop option to:

    • In Windows 10 and Windows 8 – Allow remote connections to this computer.

    • In Windows 7 – Allow connections from computers running any version of Remote Desktop (less secure).

  2. Add a user account under which you will run tests on a slave machine to the Remote Desktop Users group.

  3. Make sure that the user account has a non-empty password.

Otherwise, Jenkins will not be able to connect to the remote machine and run TestComplete tests on it.

Configure group policies

To be able to connect to a slave computer and open a user session on it, configure the following group policies on the slave computer:

  1. On your slave computer, open the Group Policy editor (type gpedit.msc in the Search dialog and press Enter).

  2. Disable the following policies:

    • Always prompt client for password upon connection

    • Prompt for credentials on the client computer

    To disable these policies

    If the computer belongs to a domain, you may need to ask your system administrator to disable these policies on the domain controller as well.

  3. If the slave computer is running under Windows 10, enable the Require use of specific security layer for remote (RDP) connections group policy and set the security layer to Negotiate.

    To configure the group policy

  4. If the slave computer is running under a non-server edition of Windows and it has other users logged in, log off those users.

  5. If the computer is running under a server edition of Windows, enable the following policy:

    • Require use of specific security layer for remote (RDP) connections (on Windows Server 2016 or Windows Server 2019)

    • Restrict Remote Desktop Services users to a single Remote Desktop Services session (on Windows Server 2012 or Windows Server 2008)

    • Restrict Terminal Services users to a single remote session (on Windows Server 2003)

    To enable the needed policy on Windows Server 2016 or Windows Server 2019

    To enable the needed policy on Windows Server 2008 and later

    To enable the needed policy on Windows Server 2003

    If the node is running in Remote Administration Server mode and there are user sessions opened on it, close unnecessary sessions.

  6. If the slave computer is configured to show a logon message when a user logs on, disable the message.

    To disable the message

    If the message persists

You can check whether the slave computer is configured correctly by connecting to it manually. If it does not show any additional messages or prompts, the group policies are configured correctly. Otherwise, you may need to ask your system administrator to disable those messages.

Disable secure sign-in

Sometimes, Windows is configured so that the user has to press Ctrl+Alt+Delete before signing in to prevent unwanted actions the software that simulates user behavior may perform. TestComplete does not provide any means to work around this feature, so we recommend you to turn it off. To do that:

  1. On the target PC, press Win+R to open the Run dialog.

  2. Type control userpasswords2 and press Enter.

  3. In the subsequent User Accounts dialog, switch to the Advanced tab.

  4. Unselect the Require users to press Ctrl+Alt+Delete option.

  5. Click OK or Apply.

Disable additional screens

To avoid issues during the testing, make sure that, when you connect to the remote machine, its desktop opens up immediately – that is, no additional screens appear (such as the login form, account selection window, or RDP Certificate Warning windows). To learn how to disable these additional screens, contact your IT department.

Run Jenkins in interactive mode

If Jenkins or a Jenkins slave agent runs as a service under a non-interactive system account (for instance, Local System) on the computer where you run tests, TestComplete will also run under the non-interactive account. As a result –

  • TestComplete will not have access to the user interface on the computer and will be unable to simulate user actions. Your automated tests that simulate user actions against GUI elements will fail.

  • TestComplete will not be able to run tests in the CrossBrowserTesting cloud. The test step will fail.

If you connect to the slave computer using the Jenkins slave agent running as a Windows application (launched via Java Web Start), TestComplete will run under a user account and can interact with GUI elements.

If you connect to the slave computer using the Jenkins slave agent running as a Windows service, to avoid possible issues and allow TestComplete to interact with GUI elements:

  1. Configure the Jenkins slave agent to run under the Local System account:

    TestComplete integration with Jenkins: Configuring Jenkins slave agent to run under a Local System account

    Click the image to enlarge it.

  2. Configure your TestComplete Test build steps in your Jenkins projects to open an interactive user session in which they will run. See the description of the Run interactive user session option of the TestComplete Tests 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.

    This feature is available only if you use TestComplete 10.60 or later. If you use TestComplete 10.50 or earlier, connect slave machines using the Launch slave agents via Java Web Start launch method.

Provide elevated permissions for TestComplete

On Windows 8 and later, TestComplete requires elevated permissions for the run. Jenkins that is run through the Java Web Start agent application, cannot start TestComplete with required permissions, and will cause the build step to fail if it tries.

To run tests under Windows 8 and later, do any of the following:

  • Install the Java Web Start agent as a service. As a service, the agent has the required permissions and can start TestComplete. Make sure the "Run interactive user session" test step option is selected.

– or –

  • Connect to the slave by using the "Let Jenkins control this Windows slave as a Windows service" launch method. Make sure the "Run interactive user session" test step option is selected.

– or –

Prepare Jenkins nodes to run tests in CrossBrowserTesting environments

In TestComplete, you can run web tests in Windows-based testing environments provided by CrossBrowserTesting.com. To learn more, see Integration With CrossBrowserTesting.com.

This approach to running tests in CrossBrowserTesting.com environments is obsolete starting with TestComplete 14.40. We recommend using the Device Cloud add-on instead. See About Cross-Platform Web Tests for details.

To run tests in CrossBrowserTesting environments from your Jenkins nodes, the following requirements must be met:

  • TestComplete must be installed on your Jenkins nodes. TestExecute cannot run tests defined in the CrossBrowserTesting manager.

  • The TestComplete version must be 12.20 or later.

  • TestComplete on your Jenkins nodes must have an active license for the TestComplete Web module.

  • You must have an active CrossBrowserTesting account.

  • On your Jenkins nodes, provide valid account information for TestComplete to connect to the CrossBrowserTesting cloud.

    Connecting to CrossBrowserTesting.com from TestComplete

    To learn more, see Connecting to CrossBrowserTesting.com From TestComplete.

In addition, configure your test step to run TestComplete in an interactive user session under a user account (see below). Otherwise, the test step will fail.

See Also

Integration With Jenkins
Preparing Jenkins for Running TestComplete Tests
Configuring Jenkins Freestyle Jobs to Run TestComplete Tests

Highlight search results