Running TestComplete Tests Locally From Visual Studio

Applies to TestComplete 12.60, last modified on September 17, 2018

You can add TestComplete projects and project suites to Visual Studio test projects and run TestComplete tests from Visual Studio in the same way you run native Visual Studio tests.

This topic provides a step-by-step description of how you can integrate TestComplete tests into Visual Studio test projects and run them locally in Visual Studio.

Requirements

You must have the following software installed on your computer:

  • One of the following Visual Studio versions:

    • Microsoft Visual Studio 2015–2017 (Community, Enterprise or Professional edition).

    • Microsoft Visual Studio 2013 (Community, Ultimate, Premium, or Professional edition).

    • Microsoft Visual Studio 2010–2012 (Ultimate, Premium, or Professional edition).

  • TestComplete 12.

  • TestComplete 12 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 12>\VS Integration\VSIntegration.exe

    Run this installer after installing TestComplete on your computer. In the installation wizard, select the Visual Studio Integration feature appropriate for your Visual Studio version.

1. Add TestComplete Tests to Visual Studio Test Project

Add a TestComplete 12 Test item to your Visual Studio test project:

TestComplete integration with Visual Studio: Add TestComplete Test item to Visual Studio test project

Configure it to run the needed TestComplete tests:

TestComplete integration with Visual Studio: Adding TestComplete Test item to Visual Studio test project

For detailed instructions on how to do this, see Adding TestComplete Tests to Visual Studio Test Projects.

2. Run TestComplete Tests

In Visual Studio 2012–2017
  1. Open the Test Explorer panel. To open the panel, choose Test | Windows |Test Explorer from the main menu of Visual Studio.

  2. The panel displays the list of available tests including TestComplete 12 Test (you may need to build your test project first to populate the list with tests).

    TestComplete integration with Visual Studio: A TestComplete 12 Test item in Test Explorer panel
  3. Right-click it and then click Run Selected Test.

  4. Visual Studio will run the test item. The item will launch TestComplete (or TestExecute), load the specified TestComplete project suite and run the selected tests.

    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.
In Visual Studio 2010
  1. Choose Test | Windows | Test List Editor from the main menu of Visual Studio.

  2. In the Test List Editor panel, place the TestComplete 12 test item in the needed category and enable it for execution.

    TestComplete integration with Visual Studio: A TestComplete 12 Test item in the Test List panel
  3. Click Run Checked Tests on the Visual Studio toolbar.

  4. Visual Studio will run the test item. The item will launch TestComplete (or TestExecute), load the specified TestComplete project suite and run the selected tests.

    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.

3. View Test Results

After the test run is completed, Visual Studio displays the TestComplete 12 Test item results:

In Visual Studio 2012–2017

The results are displayed in the Test Explorer panel.

TestComplete integration with Visual Studio: Results of the TestComplete 12 Test item in the Test Results panel of Visual Studio 2012

To view detailed output of a TestComplete test:

  1. Click Output in the summary pane at the bottom of the Test Explorer panel.

  2. Visual Studio will display the test output with the attached TestComplete test log.

    TestComplete integration with Visual Studio: TestComplete 12 Test item output
  3. To open the log, click the link to it in the Attachments section:

TestComplete integration with Visual Studio: Detailed results of the test run (Visual Studio 2012)
In Visual Studio 2010

The test results are displayed in the Test Results panel.

TestComplete integration with Visual Studio: Results of the TestComplete 12 Test item in the Test Results panel of Visual Studio 2010

To view a detailed output of a TestComplete test, double-click the test item in the Test Results panel. Visual Studio will open the TestComplete test log:

TestComplete integration with Visual Studio: Detailed results of the test run (Visual Studio 2010)

If you have Team Explorer installed and a connection to your Team Foundation Server is established, you can also publish the test results to your Team Foundation Server database:

  1. Select the desired test results in the panel.

  2. Click Publish on the panel toolbar.

See Also

Integration With Visual Studio Application Lifecycle Management
Adding TestComplete Tests to Visual Studio Test Projects

Highlight search results