The sharing of test cases and test plans between team projects is a concern for many customers. Especially in the team that develops the product + service, the sharing requirement of test cases is higher. The following is an analysis of your experience in how to implement use-case sharing between team projects in teams Foundation server.
Same team Project :
In the same team project in TFS, you can easily implement shared maintenance of test cases, and we can add test cases that already exist in test plans and test suites. You can also clone test suites and test plans, making it easy and quick to create a test plan for two iterations that are relatively close to the test content.
Figure--Cloning a test plan in Test Manager
Different team projects:
However, when you need to replicate test plans, test suites, and test cases between team projects, you find that the problem becomes more complex. The cloning capabilities in the Test manager have not been able to meet our basic needs. Some customers look for other scenarios, such as using Excel as an export/import tool, replicating test cases between team projects, or using third-party tools such as test Case Migrator Plus (http://tcmimport.codeplex.com/ The test cases are imported into the new team project, and some teams even develop an import script or tool themselves.
Some of the above scenarios can solve some of the problems in a particular scenario, but it is relatively difficult to import the relationship between test cases and test plans and test suites into other teams.
In fact, the out-of-the-box TFS product itself has a solution for sharing/replicating test plans between team projects, and the following are examples of test case references and replication to illustrate how to achieve this goal:
I. Using test cases in a reference way
First you need to understand the differences between reference and replication test Case/Suite.
The scenario in which a test case is referenced is typically the case where you add an already existing test cases to the test plan. This is based on the original test case to add a reference (Reference). Modifying the properties of a test case, such as a condition, test steps, and so on in a test plan, is reflected directly to the referenced test case.
In work item management for TFS, replicating test cases (other types of work items in the same vein) creates a completely new test case in the system and copies the property values from the original test case to the new test case.
As you can see, adding a test case (reference) to a test case is a completely different mechanism than a copy test case, and the results are completely different.
Demonstrates how to add a test case from another team project in a test plan.
Figure A. Add test cases from other team projects
(Note: All team projects must be in a Unified Team project collection.) )
second, through the Test Manager command-line tools (Tcm.exe) Copy Test Cases
In some scenarios, you need to replicate test suites and test cases directly in your team project, and copy the link relationships between them. Below we need to use a command-line tool (Tcm.exe, test Case manager) that comes with Microsoft Test Manager to implement this feature.
With this tool, you need to install:
1. Visual Studio Enterprise, or
2. Microsoft Test Manage Professional
The disk path where the command exists is generally: <drive:>\program Files\Microsoft Visual Studio <version>\common7\ide
or enter TCM directly in the visual Studio 2015 Developer Command Prompt window, such as:
Figure 3
In addition to managing test cases, TCM can also invoke automated testing capabilities, where I only show how to replicate test cases and test suites between team projects, and you can use the command "TCM/?" Get help information for all the features of this tool.
The main usage of the Copy test Suite command "TCM Suites" is the following table:
C:\Program Files (x86) \microsoft Visual Studio 14.0>TCM Suites/? TCM- test Case management tool, version 14.0.23107.0 All rights reserved (C) Microsoft Corporation. All rights reserved. Suites options available for command options TCM Suites/list [/planid:id |/querytext:query]/collection:teamprojectcollecti Onurl /teamproject:project [/login:username,[password]] TCM Suites/clone /suiteid:id/destinationsuiteid:id [/overridefield:name=value [/overridefield:name=value ...] [/destinationteamproject:projectname] [/destinationworkitemtype:workitemtype] /collection:teamprojectcollectionurl/teamproject:project [/login:username,[password]] [/clonerequirements] TCM Suites/clone /status:cloneoperationid /collection:teamprojectcollectionurl/teamproject:project [/login:username,[password]] /list command allows you to enumerate the packages in the specified schedule and Retrieve the package name and ID . /clone/suiteid/destinationsuiteid command in TFS starts a clone operation in a suite Clones all of the test cases to another target suite. The target suite must be in a different plan. All the packages that are included in the clone and test cases. You can also specify multiple test case fields and their values as overrides To differentiate the cloned test case from the original test case. The command Returns the status and completion that can be used to track the cloning operation the Operation ID . By default, the requirements-based suite will be cloned to a static suite, But if you specify /clonerequirements switch, it will be cloned to a request with a clone. Requirements-based suite. By default, the clone operation is completed in the same team project. To to perform clones across team projects, specify /destinationteamproject Switch. Note that the area path and iteration path fields need to be specified as Override to make this switch work. To change the work item type of a cloned test case, specify /destinationworkitemtype switch. /clone/status command allows cloning-based operation of the ID to track Its status and completion conditions. Example : TCM Suites/list/planid:2 TCM Suites/clone/suiteid:1/destinationsuiteid:2 /overridefield: "Iteration Path" = "Project1\iteration 2" /overridefield: "Area Path" = "Project1\area 1" /clonerequirements TCM suites/clone/status:1 |
In practical applications, the following questions need to be noted:
1. Due to functional limitations, it is not possible to implement a test plan in a direct clone of a team project, only to replicate test suites in the middle of the test plan
2. You can copy the sub-suite (sub-folders) in the test suite
3. You can copy test cases in a test suite
4. If the test case is referenced in more than one suite, you can copy the reference relationship
Http://www.cnblogs.com/danzhang/ALM MVP Zhang Hongjun
TFS-Use Microsoft Test Manager to implement test case management across team projects