Learn to use Visual Studio, Visual Studio Online, Application Insights and Team
Foundation Server to decrease rework, increase transparency into your application and increase the rate at which
you can ship high quality software throughout the application lifecycle
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.
Hope you find this functionality useful for your test case management needs. You can also read through the MSDN guidance page or the Test Release Management Guidance for more information.
Why would you want to clone (copy) all the test cases? Wouldn't you just want to link them to the new test plan? It seems like after a few iterations you would have so many copies of the same test cases that it would become unmanageable.
@Brian, if you want to link existing test cases to a new plan, you can already do that in MTM and is supported since 2010 release. But based on what we have heard from customers, both the features are equally useful based on your project needs. When moving across releases, many folks prefer to completely clone the plan, including test cases, since they want to keep an archive of the previous release's test plan, ready for reference. What you suggested is also a preferred choice of many users, especially when moving across sprints in a given release.
I have installed VS update 2, but not getting the clone test plan option in MTM. Can you please let me know if any other setting or update needs to be installed here in order to get clone test plan option in MTM?
I have a similar issue to Anish K, I cannot see the clone option as described above but can if I right click the Test Plan in Plan\Contents tree in MTM. I can then fill in the form as above but nothing happens when I click the Clone button (No error, no update no cloning).
When I clone with the Requirement option, new Requirement ID is generated in product backlog. Which will unnecessary increase items in my product backlog since requirement content is not changed. Please suggest how to copy requirements along with test cases but not creating new Requirement ID.
Currently we are using "Team Foundation Server - Version 11.0.60315.1 and VSTS - Version 11.0.60315.01 Update 2", but 'Cloning' option is not available in this version, I wanted to upgrade the version which is having ‘Cloning’ option, Can you please let me know whether it is a licensed one! If yes, what will be the cost to upgrade from lower version?
Ashwini D S
Clone option should be available if you are using MTM 2012 Update 2 and TFS 2012 Update 2.
Can you please clear the client cache once and try cloning?
(Close MTM. Delete C:\Users\<username>\AppData\Local\Microsoft\TeamTest folder and then launch MTM again).
If the above step does not help,
Can you please re-check if the TFS you are connecting to is of version 2012 Update 2?
If yes, can you let me know if the team project you are connecting to is an upgraded project (created in some earlier version of TFS)?
You can mail me the details to firstname.lastname@example.org.
Please delete TFS cache as well from the client ( C:\Users\<username>\AppData\Local\Microsoft\TeamFoundation folder).
I would suggest updating this article with a link to the correct process to LINK an entire test plan.
What I want is in the middle .. I want the ability to start with a test plan, copy it with links to all cases and suites -- but have the configurations and other settings intact.
I have the same issue as Martin Huckle. That is, I cannot see the Clone option. The only place I can "Clone" is via a right click on a test suite. However, nothing happens. Is there a solution to this problem? I have updated to MTM 2013 and still have the same issue.
In TFS 2013, After copying/cloning the test case IDs , do the testcase ID's remain the same.
If they are same then the test case will share the same fields and making change to 1 will reflect change to its another corresponding TC.
So... when I cloned a Test Plan it duplicated my test cases and Shared Steps. Great. But it changed some Test Cases into Shared Steps (so I had Shared Steps within Shared Steps within Test Cases) it also changed some Bugs into Shared Steps.
This is very worrisome.
I VERY MUCH hope it did not change Test Cases into Bugs or Shared Steps into Bugs, or any other combination. We use TFS 2013.
We should have the possibility to clone also the original Area Path. It is useful when we are working with different teams, since each one has its own area. The current version, vs 2013 does not allow us to do that and all test cases ends up having the same area path.
Brian had a great point. I would like to clone the plan and selected suites but have the option of cloning the test cases or just adding the existing ones from the source plan.