0

I would like to merge an existing MTP (Master Test Plan) defined as a Test Suite with subfolders and TestCases, into another MTP (same structured), but located in a different project in TFS2017. The idea is to have both project sharing the same MTP, so any change can be visible in both projects. By now, I've just seen the existing possibilities about cloning/copying test cases between different test suites, but all of them should be part of the same project. I guess there must be an easy way of doing that merge instead of manually, but I can't find the way to do it.

PinarT
  • 3
  • 2

1 Answers1

0

We can use an Existing Test Case (by reference) cross projects, but cannot share the same Test Plan cross projects.

If you wish to have a discrete copy of a test case, test cases, or test suites across projects (to a test plan that resides in a different project), you can perform a “clone” across projects via the command line (tcm.exe).

You could do this in MTM, could also use Tcm.exe command to copy test suites.

Please reference below articles :

Actually, there has been a related uservoice for your requirement: Export test plan tree between projects and collections in MTM

We have enabled both Test Plan and Test Suite clone capabilities within the product. See https://msdn.microsoft.com/en-us/library/hh543843.aspx

This allows you to clone test plans/test suites across projects within a collection. For moving artifacts (including test artifacts) across collections, you can use the “TFS Integration Platform toolkit”.

Marking this item as “Completed”.


UPDATE:

To copy test cases, or test suites across projects, you can use “clone” via the command line (tcm.exe).

Below sample for your reference:

Run cmd
cd C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
tcm suites /clone /collection:http://server:8080/tfs/CollectionLC /teamproject:0418Scrum /suiteid:271 /destinationteamproject:TFVC-Scrum /destinationsuiteid:274 /overridefield:"System.IterationPath"="TFVC-Scrum\Sprint 2" /overridefield:"System.AreaPath"=TFVC-Scrum

enter image description here

Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55
  • @PinarT I mean we can not "Merge" the test plans directly, we can achieve that by copy/clone the test cases , test suites, test plans from one project to another. In above answer, I provided the solution to copy/clone the test cases .. test plans... – Andy Li-MSFT Sep 12 '17 at 10:09
  • Hi Andy, Not sure what you mean here. I've been trying to copy the test suites but it doesn't allow me to do across projects. How can I do this via tcm.exe? – PinarT Sep 12 '17 at 10:27
  • let me explain this better: we need to copy (not cloning) existing MTP (Test suite) from one project to a different one, so they can be run as regression testing in the new project and if something changes in the original test suite (like adding new TCs, or updating them) it will be immediately reflected in the new project. – PinarT Sep 12 '17 at 11:50
  • @PinarT Have you tried the `tcm.exe` command? We can only via the tcm command to copy across projects, just mentioned in this link [Microsoft Test Manager – Working Across Projects: Adding an Existing Test Casevs. Cloning/Copying](https://blogs.msdn.microsoft.com/slange/2014/06/23/microsoft-test-manager-working-across-projects-adding-an-existing-test-case-vs-cloningcopying/) – Andy Li-MSFT Sep 13 '17 at 10:09
  • @PinarT I test the tcm command and it works correctly at my side, please see the update answer, you can reference the sample, just need to identify the `from` and `to` suite ID, also the other parameters and change them accordingly based on the sample command. – Andy Li-MSFT Sep 13 '17 at 11:14
  • yes, sorry, it helped me a lot. Just a related question: do you know how to override the Configuration field in the TC that are cloned? located them by "System.Configuration" didn't work for me :( – PinarT Sep 19 '17 at 15:31
  • @PinarT I suggest you open a new thread for the new question with detail information attached, thus the communities can response and you would get the answer quickly. – Andy Li-MSFT Sep 20 '17 at 01:46