Association creates a linkage between a TFS test case and a test method in Visual
Studio. You can link any unit test, coded UI test, or generic test to an TFS test
In this example, a coded UI test project (CUIT) is linked to a TFS test case by means
of the following steps:
Start Microsoft Visual Studio.
Open your project, created in the previous
topic, and then choose a test method.
Check in your test method on the TFS server.
In Solution Explorer, right-click your solution
and then click Check In.
In the Check In dialog box, type an appropriate
comment, and then click Check In.
Visual Studio will check in the solution files to the Team
Foundation source control.
Build/rebuild your project to compile all project files and components that
have changed since the most recent build.
In Solution Explorer, choose or open the
On the menu bar, choose Build, and then choose
either Build [ProjectName] or Rebuild
In Visual Studio, open the TFS test case to be associated with the test
Associate the test method with the test case.
Next to the Automated test name box, click the
ellipsis (...) button to add the automated
test method to the test case.
In the Choose Test dialog box, select the test
method to associate with the test case, and then click
Once the association is complete, in the Associated
tab of the TFS test case, you see the following:
- The Automation status field changes from Not
Automated to Automated.
- The Automation test name, Automated test
storage, and Automated test type boxes
include information pertaining to the associated test method.