TCM Command
When upgrading to the latest version of TFS, the system automatically attempts to upgrade the Tests Management components, including test plans and suites. If the automatic migration fails, use the TCM command to upgrade your test plans and test suites manually to their respective work item types (WITs).
Before you can use the TCM command, you must first import the test plan work item definition and the test plan category into the project. To learn more about the migration and when to use this command, see Manual updates to support test management.
The TCM command is applied to individual team projects. If you need to upgrade test plans in more than one team project, you will have to run it against each team project individually.
You must run the TCM command from the tools directory for TFS. By default, that location is:
drive:\%programfiles%\Microsoft Team Foundation Server 12.0\Tools
Requirements
Your application-tier server must be upgraded to the latest version of TFS.
You must be a member of the Team Foundation Administrators security group, and an administrator on the application-tier server. See Set administrator permissions for Team Foundation Server.
TFSConfig TCM /upgradeTestPlans|upgradeStatus /CollectionName:TeamProjectCollectionName /TeamProject:TeamProjectName
Parameters
Argument |
Description |
---|---|
/upgradeTestPlans |
Required unless /upgradeStatus is used. Converts existing test plan and test suites to point to the work item-based test plans and test suites. It also updates existing test management data and links between other existing test artifacts such as test points, test runs, and test results. |
/upgradeStatus |
Required unless /upgradeTestPlans is used. Reports the migration status of test data for the specified team project. It will also indicate whether the specified project has any test plans. |
CollectionName |
Required. Specifies the project collection that contains the team project for which you want to migrate test data or check the migration status. If there are spaces in the name of the team project collection, enclose the name in quotation marks, for example, "Fabrikam Fiber Collection". |
TeamProjectName |
Required. Specifies the team project for which you want to migrate test data or check the migration status. This team project must be defined in the collection that you specified by using the /collectionName parameter. If there are spaces in the name of the team project, enclose the name in quotation marks, for example, "My Team Project". |
Remarks
You use the TCM command only in the event that automatic migration of existing test data fails. To learn more about the migration and when to use this command, see Manual updates to support test management.
If you can’t access test plans or test suites that were defined before the server upgrade occurred, run TFSConfig TCM upgradeStatus to determine the status of the migration.
You run the TCM command for an individual team project. If you need to upgrade more than one team project, you will have to run it against each team project in turn.
Example
The following example shows how to check the status of test plan upgrade on the Fabrikam Fiber project hosted on the default team project collection (DefaultCollection):
tfsconfig tcm /upgradeStatus /CollectionName:DefaultCollection /TeamProject:"Fabrikam Fiber"
A sample return of the command for a project that has been successfully upgraded:
Logging sent to file C:\ProgramData\Microsoft\Team Foundation\Server Configuration\Logs\TPC_UPG_AT_0702_223317.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.
Test plan migration job has successfully completed.
The following example shows how to upgrade the test plans for the Fabrikam Fiber project, hosted on the default team project collection (DefaultCollection):
tfsconfig tcm /upgradeTestPlans /CollectionName:DefaultCollection /TeamProject:"Fabrikam Fiber"
A sample return of the command, including the two questions listing the tasks you must complete before you can run the command:
Logging sent to file C:\ProgramData\Microsoft\Team Foundation\Server Configuration\Logs\TPC_UPG_AT_0515_143B21.log
Microsoft (R) TfsConfig - Team Foundation Server Configuration ToolCopyright (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 completed 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.