To run automated tests associated with test cases, create a build including your test project and associate the build with your test plan.
Note: | This topic explains how to create a build definition that includes TestComplete tests to be run as part of a test plan.
To learn how to create a build definition that will run TestComplete tests during the build, see Defining a Build Process (Running TestComplete Tests as Part of a Team Build). |
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.
Creating and Configuring Build Definitions
-
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 Build hub (if you use Team Foundation Server 2015 Update 1) or to the Builds page of the Build & Release hub (if you use Team Foundation Server 2015 Update 2 or later):
-
Open an existing build definition or click
New to create a new build definition:
In the Create new build definition wizard, configure the definition to be created:
-
Select the needed definition type.
-
On the Settings page of the wizard, specify the build source.
-
Select the queue for the build and click Create.
-
-
On the Repository page of the definition, 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:
If You Use Git or Subversion
Specify the repository and the branches that store your team project files:
Keep in mind that the test project stores the relative path to TestComplete tests. When mapping the TestComplete source control path, make sure to select a local folder to keep the relative path specified in the test project valid. -
On the Build page of the definition, add a step that will build your Visual Studio test project:
Click
Add build step.
In the Task Catalogue, select Visual Studio Build and click Add:
In the Solution box, click the ellipsis button and browse for the Visual Studio test project containing your TestComplete tests:
You can find information about tasks in the Build and release tasks article in the MSDN Library.
-
If needed, specify other build properties. To learn more, see the Continuous integration and deployment section in the MSDN Library.
-
Save the changes.
After you create a build definition, start it to create a team build instance to be associated with your test plan. See 5. Creating a Build Instance.
See Also
Creating a Build Containing TestComplete Tests
Running TestComplete Tests as Part of a Test Plan
Preparing Visual Studio Test Projects for Running TestComplete Tests