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
-
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.
-
Navigate to the Releases page of the Build & Release hub:
-
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:
For a new release definition, select a source of artifacts to be deployed:
-
On the Environments page of the definition, select an existing environment that will run your TestComplete tests or create a new environment.
-
To the needed environment, add a task that will run your TestComplete tests:
Running TestComplete Tests by Using Visual Studio Test Task
Running TestComplete Tests by Using Run Functional Tests Task
Running TestComplete Tests by Using Visual Studio Test Task
To run TestComplete tests on a build computer, use the Visual Studio Test task:
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:
-
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:
Note: Make sure that the path to TestComplete projects or project suites that the TestComplete test items store remains valid. -
Configure your environment to deploy Test Agent for Visual Studio on computers where tests will run:
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.
-
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.
-
Add the Run Functional Tests task to the definition and configure it to run TestComplete tests:
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.
-
-
Specify other release properties. To learn more, see the Continuous integration and deployment section in the MSDN Library.
-
Save the changes.
After creating a release definition, deploy the release.
See Also
Creating a Build Containing TestComplete Tests
Running TestComplete Tests and Viewing Test Results