Update a team project manually to support test management
TFS 2018 | TFS 2017 | TFS 2015 | TFS 2013
This topic applies to a team project that is defined on an on-premises Team Foundation Server (TFS)and was created using a process template that doesn't have test plans and test suites work item types.
When you upgrade your existing on-premises deployment to Team Foundation Server (TFS) 2013.3, you have the ability to customize test plans and test suites because these objects are now remodeled as work item types (WITs).
To accomplish this transformation, the TFS Upgrade Wizard automatically updates the team projects defined for all collections on the application tier and migrates existing test data and objects. Behind the scenes, it performs two activities:
Imports the WIT definitions for test plan and test suite, and updates the categories definition for team projects to include test plan and test suite categories.
Migrates existing test management data. Work items are created from existing test plan and test suites, and links between the other existing test artifacts—such as test points, test runs, and test results—are fixed to point to the work item-based test plans and test suites.
Data migration depends on a successful import of WIT definitions and updates. If the first activity fails, the second one will not occur. In the event that either activity is unsuccessful, the wizard logs one or more warnings or errors.
When this occurs, you'll need to manually update your team project. You won't be able to access existing test plans and test suites until you perform the manual updates.
Errors might occur if your team project already contains WITs labeled Test Plan or Test Suite, or you've upgraded from TFS 2005 and 2008 and you haven't added the necessary work tracking objects to support test management. See Update a team project based on an MSF v4.2 process template.
Manually update your team project to support the test experience
The following steps provide support for the test experience available with TFS 2013.3 or later versions.
Import the test plan and test suite WIT definitions.
If you don't have administrative permissions, get them. To perform all the update steps, you need to be a member of the Team Foundation Administrators security group, and an administrator on the application-tier server.
Open a Command Prompt window according to the instructions provided in witAdmin: Customize and manage objects for tracking work. For example:
%programfiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer
Import the test plan and test suite WIT definitions. Specify the DirectoryPath to the WorkItem Tracking/TypeDefinitions folder that contains the process template that you downloaded.
witadmin importwitd /collection:"CollectionURL" /p:"ProjectName" /f:"DirectoryPath\TestPlan.xml" witadmin importwitd /collection:"CollectionURL" /p:"ProjectName" /f:"DirectoryPath\TestSuite.xml"
An example of CollectionURL is http://MyServer:8080/tfs/DefaultCollection.
The DirectoryPath must follow this structure: Drive:TemplateFolderWorkItem TrackingTypeDefinitions. For example:
C:Process TemplateMicrosoft Visual Studio Scrum 2013.3WorkItem TrackingTypeDefinitions
Update your category definitions.
Export your categories definition file.
witadmin exportcategories /collection:CollectionURL /p:ProjectName /f:"DirectoryPath\Categories.xml"
Add the following categories.
<CATEGORY name="Test Plan Category" refname="Microsoft.TestPlanCategory"> <DEFAULTWORKITEMTYPE name="Test Plan" /> </CATEGORY> <CATEGORY name="Test Suite Category" refname="Microsoft.TestSuiteCategory"> <DEFAULTWORKITEMTYPE name="Test Suite" /> </CATEGORY>
Add the new WITs to the hidden categories.
<CATEGORY name="Hidden Types Category" refname="Microsoft.HiddenCategory"> <DEFAULTWORKITEMTYPE name="Code Review Request" /> <WORKITEMTYPE name="Code Review Response" /> <WORKITEMTYPE name="Feedback Request" /> <WORKITEMTYPE name="Feedback Response" /> <WORKITEMTYPE name="Shared Steps" /> <WORKITEMTYPE name="Shared Parameter" /> <WORKITEMTYPE name="Test Plan" /> <WORKITEMTYPE name="Test Suite" /> </CATEGORY>
Import the updated file.
witadmin importcategories /collection:CollectionURL /p:ProjectName /f:"DirectoryPath\Categories.xml"
Migrate existing test plans and suites to work item based test plans and suites.
Open a Command Prompt window on the TFS application-tier server and change the directory. For example:
cd %programfiles%\TFS 15.0\Tools
Run the TfsConfig TCM command.
TFSConfig TCM /upgradeTestPlans /CollectionName:CollectionName /TeamProject:TeamProjectName
TFSConfig TCM /upgradeTestPlans /CollectionName:"Fabrikam Fiber Collection" /TeamProject:"Fabrikam Fiber"
Respond to the questions that appear.
Logging sent to file C:\ProgramData\Microsoft\Team Foundation\Server Configuration\Logs\TPC_UPG_AT_0515_143821.log Microsoft (R) TfsConfig - Team Foundation Server Configuration Tool Copyright (c) Microsoft Corporation. All rights reserved. Command: tcm Microsoft (R) TfsConfig - Team Foundation Server Configuration Tool Copyright (c) Microsoft Corporation. All rights reserved. In order to upgrade the test plans, you have to complete the following steps: 1. Import the test plan work item definition into the project. Have you complete d this step? (Yes/No) Yes 2. Import the test plan category into the project. Have you completed this step? (Yes/No) Yes Test plan migration job successfully scheduled.
If you're migrating a large quantity of test plans and test suites, you can run the following command to monitor the progress of data migration.
TFSConfig TCM /upgradeStatus /collectionName:CollectionName /TeamProject:TeamProjectName
After a successful data migration, all test management data should be available for use. For more information about this utility, see TFSConfig command, TCM.
For information about how to access the new WIT-based test plans and test suites in the web portal, see Create a test plan.