To execute TestArchitect test cases from MTM, an
association must be created in the related Visual Studio project.
Ensure that you have already taken the following step(s):
Created TA-MTM integration
Running TA tests from MTM requires two types of associations:
mappings of TA and TFS test cases in the two respective systems, discussed
- a process of association in the related Visual Studio project. This process
automatically generates C# code snippets in Microsoft Visual Studio to link the
TA and TFS test cases.
Start Visual Studio.
Right-click a project, and then select Associate.
Alternatively, click the Generate and Associate
Test Method from TestArchitect
button on the Visual Studio toolbar.
Note: If the Generate and Associate Test Method from
TestArchitect button is not visible on the Visual Studio
toolbar, enable the button by right-clicking on the toolbar and selecting
TestArchitect from the context menu.
In the Connect to Team Foundation Server dialog box,
select the server to connect to from the Team Foundation
Server drop-down box, and then choose the correct team project
values for Team Project Collections and Team
Projects. Click Connect to establish an
association between TFS and TestArchitect.
In the Select Test Plan dialog box, choose a test plan,
then click Select plan to proceed.
In the Select Tests dialog box, select the test suites and
test cases to associate with the tests. Tests which have been associated
previously are selected automatically. After you finish selecting the desired
tests, click Associate.
Tip: In this dialog box, you can select Filter to
narrow down the list of test cases displayed based on the selected
A confirmation dialog box appears, letting you know that the association was successful.
Click OK to close the dialog box.
- Test methods are generated in the project as follows:
- In MTM, information on the association is added into test cases as
Check in the solution to save the associated data by doing the following:
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.
Microsoft Visual Studio automatically generates C# code snippets which associate the
test cases with the TFS test cases. You
normally do not need to edit the generated snippets. However, you should verify that the
test case IDs for each test method match the associated IDs.
In the above example, three C# test methods have been generated (one method for each
test case) for the three TestArchitect
test cases (TC01,
TC02, and TC03). Each method consists of a call to RunTestCase
starts the execution of the TestArchitect
test case whose
source field maps to the TFS test cases with identifiers 1
, and 5
Important: This task is one that
must often be repeated, especially when you have modified mapped TFS test cases.
(For example, you remove or add test cases, or change the order of a test case
run.) When you do so, the association between TFS test cases and Visual Studio
test methods/TestArchitect test cases is
compromised. Hence, it is necessary that you perform the following steps
TestArchitect test cases with TFS test
- Check in your project.
- Queue the