Run Test Cases with Associated TestComplete Tests by Using the Run Functional Tests Task

Applies to TestComplete 14.50, last modified on April 22, 2021
This approach to running TestComplete tests as part of a test plan is obsolete. We do not recommend using it. Starting from version 14.20, you can assign your TestComplete tests to Azure test cases directly from TestComplete IDE and run them as part of your team project’s test plan. To learn more, see Integration With Azure DevOps and Team Foundation Server.

This instruction applies to Team Foundation Server 2015–2017 On-Premises only.
If you use Azure DevOps Services, Azure DevOps Server 2019 or Team Foundation Server 2018, the Run Functional Tests task is deprecated. You can run test cases with TestComplete tests associated by using the Visual Studio Test task or from the Test Plans page of your project.

After you configure your test plan and associate test cases in your test plan with your TestComplete tests, you can run your test cases with associated TestComplete projects.

Requirements

The computer, where you create a team build or release, must have access to your team project:

  • You can access the project from Visual Studio Team Explorer. To do this, you must have Microsoft Visual Studio 2015–2019 (Community, Enterprise or Professional) with the Team Explorer component.

– or –

  • On the computer, where Visual Studio is not installed, you can access the project directly from your web browser by using Team Web Access:

    http://<Your_Server_Name>:8080/tfs/<Collection_Name>/<Project_Name>

Remote computers where your TestComplete tests will run (test agents) must have the following software installed:

  • Test Agent for Microsoft Visual Studio.

    Note: You can use the Visual Studio Test Agent Deployment task to install the test agent (see below). To learn about the requirements the remote computers must meet so that you can install the test agent on them, see the step description.

  • TestComplete 14 (or TestExecute 14).

  • TestComplete 14 Visual Studio Integration Package.

    The Integration Package installer is shipped along with TestComplete. You can find it in the TestComplete folder after installing the product:

    <TestComplete 14>\VS Integration\VSIntegration.exe

    Run this installer after installing TestComplete on test agents. In the installation wizard, select a Test Agent Integration feature appropriate to your test agent version.

Configure your Build or Release Definition to Run Your Test Plan

  1. Share a folder on remote computers where tests will run. To that folder the test files will be placed.

  2. Open the web portal of your team project. You can navigate to it directly in your web browser, or you can open it from Team Explorer in Visual Studio.

  3. Navigate to the Build hub (if you use Team Foundation Server 2015 Update1) or to the Build & Release hub (if you use Team Foundation Server 2015 Update 2–2017):

    TestComplete integration with Visual Studio: Build & Release hub

    Click the image to enlarge it.

  4. Open an existing build or release definition, or create a new one.

  5. Configure your definition to copy your TestComplete tests from build output folder to computers where tests will run. For example, you can use the Windows Machine File Copy task to do this:

    TestComplete integration with Visual Studio: Copying test fiels to test agents

    Click the image to enlarge it.

    Note: Make sure that the path to TestComplete projects or project suites that the TestComplete test items store remains valid.
  6. Configure your definition to deploy Test Agent for Visual Studio on computers where tests will run:

    TestComplete integration with Visual Studio: Deploying test agents

    Click the image to enlarge it.

    Specify the computers, to which the agent will be deployed. Specify the login and password of the user account that will be used to deploy agents.

    Important: Configure the agent to run UI tests. Otherwise, the agent will launch TestComplete (or TestExecute) in non-interactive mode, and it will not be able to access UI elements to simulate user actions.

  7. Make sure that TestComplete (or TestExecute) and the TestComplete Integration package are installed on remote test agents before you run tests.

    You can configure your definition to install them by using the Run PowerShell Script on Target Machines task. Configure the task to run a script that will install TestComplete (or TestExecute) and the Integration package via command line in silent mode.

    To learn more about installing TestComplete from the command line, see Installing TestComplete in Silent Mode. To learn about installing TestExecute in silent mode, see the appropriate topic in the TestExecute documentation.

    To learn more about installing the Integration package via command line, see Installing Integration Package.

  8. Configure your definition to run the test plan that includes test cases with TestComplete tests assigned:

    • Add the Run Functional Tests task:

      TestComplete integration with Visual Studio: Configuring a Run Functional Tests task to run test cases with TestComplete tests assigned

      Click the image to enlarge it.

    • In the Machines text box, specify remote computers where tests will run.

    • In the Test Drop Location text box, enter the path where your tests reside.

    • In the Test Selection drop-down list, select Test Plan.

    • In the Test Plan and Test Suite drop-down lists, select a test plan and a test suite that contain test cases with TestComplete tests associated.

  9. Specify other definition properties if needed.

  10. Save the changes.

Run Tests and View Test Results

Run your build or deploy the release.

It will run TestComplete tests on specified remote agents and assign the test results to the appropriate test cases.

Note: If the 64-bit version of TestComplete/TestExecute is available on a machine, it will be used to run tests. Otherwise, the 32-bit version will be used.

Prev

See Also

Running Test Cases with Associated TestComplete Tests
Assigning Builds Containing TestComplete Tests to a Test Plan

Highlight search results