In Visual Studio Update 2, we introduced the capability to clone test plans in Microsoft Test Manager. This feature lets you clone test plan artifacts within a given team project, by creating copies of all the test cases, shared steps and requirements, recreating the same suite structure and applying the same test settings, environments, builds, configurations and other plan properties(test results and bugs are not cloned). Read through this post to know more about this functionality.
We have often heard requests from our customers about being able to clone test plans while working across sprints or releases. While we already had the functionality to clone test suites through the tcm.exe command line, in Visual Studio 2012 and had enhanced it further in VS Update 1, we have added the capability to clone test plans and suites from the MTM user interface, in VS update 2.
To access this feature, I can go to the test plan properties page(Testing Center-> Plan -> Properties) and click on the ‘Clone’ option.
Let’s say that I want to clone the current sprint’s (sprint 1) test plan, to use it for the next sprint (sprint 2). I click on the ‘Clone’ option which shows the following dialog:
I can specify the suites that I want to clone by specifying the suites in the ‘Clone from’ area. If I don’t select any suite, a blank test plan will get created with the source test plan’s properties applied to the new test plan.
Selecting a node will select all its children recursively and vice-versa. I have selected all suites except the ‘Regression tests’ suite since I do not want to clone that.
After the suite selection, I also have an option to specify whether I want to clone the requirement work items (associated to the requirement based suites in my selection) as part of this operation. If I don’t check this option, static suites will be created corresponding to the requirement based suites selected by me, and the relevant test cases will be cloned and put inside the static suites.
For the destination test plan, I need to specify its name, area path and iteration path in the ‘Clone to’ area. All the test cases that get cloned as part of this operation will also use the same area and iteration paths.
Once done with specifying the fields, I can click on the ‘Clone’ button. This will initiate the test plan clone operation and show me a progress view of the same.
Once completed, the status will change to ‘Succeeded’ and the details like duration, date started, date completed, total number of test cases, shared steps and requirements cloned, etc. will get updated.
If I want to view the new test plan I can select it from the test plan selector dialog and connect to it. All the properties, test suites, test cases, requirements of the sprint 1 test plan have been added as desired.
For all the work items that got cloned as part of this process, a comment mentioning the clone operation ID and the source work item ID, is added to work item’s history for tracking and auditing purposes.
This feature can also be accessed by using the ‘Clone’ option in Test Plan Manager (Testing Center-> Organize-> Test Plan Manager) or right clicking on the root node (in Testing Center-> Plan -> Contents) and selecting the ‘Clone plan’ option.