Prepare TestComplete Project for Integration

Applies to TestComplete 15.48, last modified on March 01, 2023

Before you can run your TestComplete tests as part of your pipeline or of a test plan managed by Azure DevOps or Team Foundation Server, prepare your TestComplete project:

Prerequisites

Make sure that your tests meet the following requirements:

  • Tests can run independently of each other. When you run them as part of a pipeline or test plan, they may be distributed among multiple agents and executed in an arbitrary order.

  • Tests run correctly. You can verify if the tests can run correctly, for example, by running them on your local computer.

1. Specify tests you want to run

There are several ways you can specify tests that you will run as part of your Azure DevOps pipeline:

Depending on the selected approach, configure the TestComplete test adapter. See Configure a pipeline - Enable support for TestComplete tests.

By adding them to the project’s Execution Plan

  1. In TestComplete, open the project that contains tests you want to run.

  2. Add tests you want to run to the Execution Plan of the project.

    Supported tests
    Unsupported tests

    The TestComplete test adapter will ignore the following items in the Execution Plan:

    TestComplete integration with Azure DevOps: Creating test cases

    Click the image to enlarge it.

    For detailed instructions on how to manage tests in the Execution Plan, see the Execution Plan editor description.

By marking them as test cases directly

Note: Not applicable if you run your TestComplete tests as part of Azure DevOps test plans.

The TestComplete test adapter will scan all project items of your TestComplete project and run all test cases it will find. It considers test cases to be the following:

Test cases
  • Keyword tests and script tests that have any tag assigned to them.

    By default, the test adapter treats all tests with tags assigned to them as test cases and will run all these tests. To run only tests that have a specific tag assigned, use the filter expression.

  • BDD scenarios.

  • Scenario outlines, if the Treat each example in Scenario Outline as a separate test case option of the project is disabled.

  • Script routines marked as test cases in code. To mark a routine as a test case, add a comment in the // @"test_case_name" format right before the routine declaration. Do not omit double quotes.

    For example:

    JavaScript, JScript

    // @"Open web store"
    function OpenWebStore()
    {
      …
    }

    Python

    # @"Open web store"
    def OpenWebStore():
      …

    VBScript

    '@OpenWebStore
    Sub OpenWebStore()
      …
    End Sub

    ' This test searches for a product
    ' @AllTests @FindProduct
    Sub FindProduct()
      …
    End Sub

    '@AllTests
    '@Add-to-cart @low-priority
    Sub AddToCart()
      …
    End Sub

    DelphiScript

    // @"Open web store"
    procedure OpenWebStore();
    begin
      …
    end;

    C++Script, C#Script

    // @"Open web store"
    function OpenWebStore()
    {
      …
    }
Not test cases

The TestComplete test adapter does not consider the following items to be test cases and will ignore them:

  • Script routines or keyword tests with no tags assigned to them.

  • Arbitrary parts of script code marked as test cases with the aqTestCase.Begin and aqTestCase.End methods.

  • BDD feature files.

  • Scenario outlines, if the Treat each example in Scenario Outline as a separate test case option of the project is enabled.

  • Any other test types, like low-level procedures, unit tests, ReadyAPI tests, etc.

The test adapter will not scan the Execution Plan of the project for test cases.

2. Add your TestComplete project suite to the repository of your team project

We recommend that you do it directly from TestComplete IDE. This way, only the necessary files will be added. How to add the project suite depends on the type of the repository you use to store team files. To learn how to add TestComplete projects to various source control systems, see the Integration With Source Control Systems section.

TestComplete integration with Azure DevOps: TestComplete project in a team project repository

Click the image to enlarge it.

4. Make sure that your tests can access your tested application and all files and resources required for testing

  • If your projects use the Tested Applications collection to run your applications under test, make sure that the application launch parameters that the collection items specify will remain valid after your project is placed to Azure DevOps test agents.

  • If your tests launch your tested applications by using hard-coded launch parameters, make sure that those parameters will remain valid after your project is placed to Azure DevOps test agents.

  • If your tests use external files, for example, files that store input test data, make sure that they will be able to access them when running on your Azure DevOps test agents.

You may want to configure your pipeline to place all the needed files to your Azure DevOps test agents before you run your TestComplete tests. If the files are stored in your source control repository, configure your pipeline to place them to the needed target location on the test agent. You can also use various pipeline tasks to do this.

See Also

Integration With Azure DevOps and Team Foundation Server via TestComplete Test Adapter
Integration With Azure DevOps and Team Foundation Server - Requirements
Prepare Test Agents to Run TestComplete Tests
Tests, Test Items, and Test Cases
Integration With Source Control Systems

Highlight search results