4. Defining a Release Process (Running TestComplete Tests as Part of Release Deployment)

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

After you create a build that places TestComplete tests to the needed location, you can create a release definition that will run those tests during the deployment:

Requirements

The computer, where you create a build definition, 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 - 2017 (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:

    For On-Premises Team Foundation Server

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

    For Team Foundation Services

    https://<Your_VSO_Account_Name>.visualstudio.com/<Project_Name>

    You can find information on Web Access in the Work in the TFS Web Portal article of the MSDN Library.

Configuring a Release Definition

  1. 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.

  2. Navigate to the Releases page of the Build & Release hub:

    TestComplete integration with Visual Studio: Releases page of the Build & Release hub
  3. Right-click an existing release definition and then click Edit to open it for editing or click Create release definition to create a new one:

    TestComplete integration with Visual Studio: Creating a new release definition

    Click the image to enlarge it.

    For a new release definition, select a source of artifacts to be deployed:

    TestComplete integration with Visual Studio: Selecting artifacts type

    Click the image to enlarge it.

  4. On the Environments page of the definition, select an existing environment that will run your TestComplete tests or create a new environment.

  5. To the needed environment, add a task that will run your TestComplete tests:

    Running TestComplete Tests by Using Visual Studio Test Task

    To run TestComplete tests on a build computer, use the Visual Studio Test task:

    TestComplete integration with Visual Studio: Configuring a Visual Studio Test task to run TestComplete tests

    Click the image to enlarge it.

    In the Test Assembly text box of the task, specify the .tc12test files to be run.

    Running TestComplete Tests by Using Run Functional Tests Task

    To run TestComplete tests on remote computers (test agents), use the Run Functional Tests task:

    1. Configure your environment to copy your TestComplete tests from artifact drop 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 files 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.
    2. Configure your environment 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.

    3. 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 environment 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.

    4. Add the Run Functional Tests task to the definition and configure it to run TestComplete tests:

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

      Click the image to enlarge it.

      In the Machines text box, enter the network names or IP addresses of test agents 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 box, select Test Assembly. In the Test Assembly text box, specify the .tc12test files to be run.

    You can find information about tasks in the Build and release tasks article of the MSDN Library.

  6. Specify other release properties. To learn more, see the Continuous integration and deployment section in the MSDN Library.

  7. Save the changes.

After creating a release definition, deploy the release.

Prev     Next

See Also

Creating a Build Containing TestComplete Tests
Running TestComplete Tests and Viewing Test Results

Highlight search results