Applies to TestComplete 14.0, last modified on January 24, 2019

To run a freestyle Jenkins job that will execute your TestComplete tests, add the TestComplete Test build step to it:

1. Choose nodes to run tests on

The node where you will run tests must have TestComplete or TestExecute installed. To make sure the job will run only on this node, select the Restrict where this project can be run check box and enter the name of the node, where you will run TestComplete tests.

2. Add steps that will prepare testing environments

Before adding a TestComplete Test build step, you need to prepare and copy TestComplete project files, the tested application and other test-related files and folders to the working folder on the node. If these files are absent from the node, Jenkins will be unable to run the test.

You can place all the files to the node beforehand, or you can add one or multiple build steps to your Jenkins job to perform all the preparation tasks. For example, you can use the Folder Copy operation provided by the File Operations Plugin.

Note: TestComplete test project files should reside in the job’s working folder or in its subfolders.

3. Add TestComplete Test step

  1. In the Build section, click Add build step and choose TestComplete Test from the drop-down list:

  2. The TestComplete Test build step will be added:

  3. Configure the step to run the needed TestComplete tests:

    1. Specify the test project suite in the Project suite file field.

      Note: The path should be relative to the job’s working folder on the node.
    2. Select the test of the project suite to be run:

      • Entire suite - Runs the entire project suite.

      • Project test - Runs a specified project in the project suite.

      • Script test - Runs a script routine.

      • Keyword test - Runs a keyword test.

      • Other - Runs any test your project contains: a project test item, a low-level procedure, a unit test, a network suite test, and so on. In the Project text box, enter the name of your project. In the Test name text box, enter the full path to the project item or test item to run. Use vertical bars ( | ) as separators.

        Show Example

        The test path should contain collection names only. Do not include any project folders in the path.

      • CrossBrowserTesting tests (TestComplete 12.20 or later with the Web module license is required) – runs tests in CrossBrowserTesting environments.

        Your slave nodes must have TestComplete installed. TestExecute cannot run tests in CrossBrowserTesting environments.

        TestComplete on your slave nodes must be able to access the CrossBrowserTesting cloud, and your project suite must include environments and tests assigned to them.

        To learn more, see Prepare Jenkins Nodes to Run Tests in CrossBrowserTesting Environments.

    3. Click Advanced to configure additional settings of the TestComplete Test step:

      • Test runner - Specifies whether the step will use TestComplete or TestExecute for the test run. If both are installed and (Any) is selected, TestExecute is run.

        Notes:

        • The selected product must be installed on the node. If the 64-bit version of the product is available on the node, it will be used to run tests. Otherwise, the 32-bit version will be used.

        • To run tests in CrossBrowserTesting environments, select TestComplete.

      • Version - Specifies the TestComplete or TestExecute version to be used in case you have several versions of these products installed on the node. Jenkins uses the latest installed version by default.

      • Action on warnings - Specifies whether Jenkins should mark the entire build as failed or unstable when the TestComplete test log contains warnings.

      • Action on errors - Specifies whether Jenkins should mark the entire build as failed or unstable when the TestComplete test log contains errors.

      • Additional command-line arguments - Specifies arbitrary command-line arguments to be passed to TestComplete. To learn more about the TestComplete command line, see TestComplete Command Line.

      • Use test timeout - Specifies the maximum test execution time in seconds.

        The timeout includes both the startup time of TestComplete (TestExecute) and the test run time. If you run tests in the CrossBrowserTesting cloud, the timeout will also include the startup time of CrossBrowserTesting environments.

        If the test is not finished until the specified period elapses, Jenkins will mark the entire build as failed.

      • Run interactive user session - Specifies whether your TestComplete test will run in an interactive session.

        This option is effective only if you use TestComplete or TestExecute 10.60 or later.

        If this option is disabled and Jenkins is running as a service, your TestComplete tests will fail.

        For information on when you need to use this option, see Requirements.

        • User - The user profile that will be used to run the test.

        • Password - The password used to log in to the user account.

        • Use active session - Specifies whether an existing user session will be used to run a TestComplete test. If it is selected, TestComplete will run in the current session. Otherwise, Jenkins will close all the applications, terminate the currently active session, start a new session under the specified user account and then start the test.

          Note: Jenkins will not stop the user session if another user is logged on.
        • Session screen resolution - Select a screen resolution for the user session in which your TestComplete test will run. The default value is 1280×1024.

          If you use a TestComplete version earlier than 12.30, the specified screen resolution will be ignored and the default screen resolution (1280×1024) will be used.

          If the Use active session option is enabled, the specified screen resolution will be ignored and the actual screen resolution of the corresponding user session will be used.

          Note: The maximum resolution that can be set for a user session depends on the operating system version and on the Remote Desktop Protocol version installed on the target computer. To learn more, see Remote Desktop Protocol Maximum Supported Resolutions.
      • Generate MHT log file - If this option is enabled, TestComplete exports test results to a .mht file after the build is over. You can download this file from the Jenkins page displaying test results.

        If this option is disabled, TestComplete does not export test results in the MHT format, but you can still examine results in Jenkins. See Viewing TestComplete Test Results in Jenkins.

      • Generate JUnit-style report - Specifies whether Jenkins will generate JUnit-style reports. For more information on how JUnit reports are represented in Jenkins, see Viewing TestComplete Test Results in Jenkins.

Example

Here is a sample setup of a TestComplete Test build step:

Show Example

See Also

Integration With Jenkins
Preparing Jenkins for Running TestComplete Tests
Requirements

Highlight search results