Configure XAML Builds to Run TestComplete Tests

Applies to TestComplete 14.40, last modified on April 22, 2021
Including TestComplete tests into XAML builds is deprecated. This functionality will be removed in one of the future TestComplete versions. We recommend that you use the new TestComplete integration with vNext builds. See Integration With Azure DevOps and Team Foundation Server.

If you use XAML builds in your team project, you can configure a XAML build to run TestComplete tests after Team Foundation finishes building your project.

Requirements

A computer where a team build is created and configured must have one of the following versions of Visual Studio with the Team Explorer component installed:

  • Visual Studio 2019 (Community, Enterprise or Professional).

  • Visual Studio 2017 (Community, Enterprise or Professional).

  • Visual Studio 2015 (Community, Enterprise, Professional, or Test Professional).

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

  • Visual Studio 2012 (Ultimate, Premium or Professional).

  • Visual Studio 2010 (Ultimate, Premium, or Professional).

The Visual Studio version to be used depends on your version of Team System Server. See the Requirements and compatibility article in the MSDN library.

Important: To create XAML build definitions in Visual Studio 2015–2019, you must have a XAML build controller installed and configured. To learn more, see the Continuous integration and deployment section in the MSDN library.

Defining a Build Process

  1. In Visual Studio, open the Team Explorer panel (if it is hidden, select View | Team Explorer from Visual Studio’s main menu to display the panel) and connect to your team project.

  2. In Team Explorer, click Builds, and then click a build definition you want to configure to run TestComplete tests or click New Build Definition to create a new definition.

  3. If needed, in the General tab of the window, specify the build definition name and description.

  4. In the Trigger tab, if needed, you can specify the event that will initiate the build. By default, team builds are run manually.

  5. In the Source Settings tab (for Team Foundation Server 2013) or in the Workspace tab (for Team Foundation Server 2010–2012), configure your build definition to get the needed files from your source control:

    If You Use Team Foundation Version Control
    • Map the source control directories that store your Visual Studio test project and TestComplete projects to the appropriate local directories on the build computer:

      TestComplete integration with Visual Studio: Mapping TFVC repositories to a build folder
      Note: Keep in mind that the test project stores the relative path to the TestComplete project. When mapping the TestComplete source control path, make sure to select a local folder on the build agent to keep the relative path specified in the test project valid.
    If You Use Git (For Team Foundation Server 2013)
    • Specify the Git repository and the branches that store your team project files.

      TestComplete integration with Visual Studio: Mapping Git repository to a build location
  6. In the Build Defaults tab, specify the build controller that will be used to process the team build:

    TestComplete integration with Visual Studio: Selecting XAML build controller

    In the Staging location section of the tab, specify the way the build process will store the output files and logs:

    • To copy output files and logs to a shared folder on the build server, click Copy build output to the following drop folder and specify the UNC path to the target folder. Make sure that the Build Server can access the folder.

    • (For Team Foundation Server 2012–2013) To copy output files and logs to a folder in the version control, click Copy build output to the following Source Control folder and specify the path to the folder.

  7. In the Process tab, specify the details of the build process:

    In the Build process parameters table, expand the Build node. In the Project box, specify the Visual Studio test project containing your TestComplete tests:

    TestComplete integration with Visual Studio: Configuring a XAML build to build a Visual Studio test project containing TestComplete tests

    For your team build to run automated TestComplete tests included in your test project:

    • Expand the Automated tests node under the Test node in the Build process parameters table.

    • Click the ellipsis button in the Test source box. The Add/Edit Test dialog will appear.

    • In the Name box of the Add/Edit Test dialog, specify the name of the test run and in the Test Runner box of the dialog, select Visual Studio Test Runner.

      In the Test assembly file specification box of the dialog, type **\*.tctest to specify TestComplete tests.

      TestComplete integration with Visual Studio: Configuring a XAML build to run TestComplete tests

      – or –

      If you use tests lists, click Test metadata file (.vsmdi) to enable running tests defined in the test metadata file of the test project.

      Click Browse and browse the needed test metadata file.

      To run all tests defined in the metadata file, select the Run all tests in this VSMDI file check box.

      To run tests defined by a test list, clear the check box and select the needed test list in the Test lists to run list:

      TestComplete integration with Visual Studio: Configuring a build to ruin a test list containing TestComplete tests

    The Test source node will specify the TestComplete tests to be run and the test run details. You can modify these parameters if needed.

    TestComplete integration with Visual Studio: Automated tests settings
  8. Save the changes. Your build definition will be displayed on the Builds page in Team Explorer.

Prev     Next

See Also

Defining a Build Process
Running TestComplete Tests as Part of a Build and Viewing Test Results

Highlight search results