Preliminary actions to use this tool in version 1.0.0 :

2 assumptions :

[1] You want to copy test plan between 2 TFS project collections

[2] You want to restore your test plan from a database backup restore in a new project collection to extract an older test plan version (following some incorrect updates or deletions)

Here are the details...

[1] Use a tool like this one : http://blogs.microsoft.co.il/blogs/shair/archive/2011/03/20/test-case-migrator-between-projects-wpf-metro.aspx to migrate the test cases and then this tool to migrate the full test plan.
The test case will be searched on target TFS instance firstly by "Title". Refer to log file for TestCase-TestSuite mapping issues.

[2] For the second scenario, here is a tutorial :

How to attach a TFS Project Collection with a different name to your TFS instance after a SQL Server backup restore ?

From your TFS server :

- Open "CommandLine" tool as Administrator

cd "C:\Program Files\Microsoft Team Foundation Server 2010\Tools\"

- Restore a valid SQL Server backup on your SQL Server instance under a different name :

Example project collection database name : Tfs_Restored
Example configuration database name : Tfs_Configuration

- If your want to attach your restored project collection to the same TFS instance than the current one, update your existing project collection ID with the following command :

NOTE : this command could have an impact on TFS linked modules or third party applications ... please read carefully the TfsConfig command documentation and warnings before doing this

TfsConfig changeserverid /SQLInstance:[SQLServerName\SQLInstanceName] /DatabaseName:Tfs_Configuration /ProjectCollectionsOnly

- Mount the restored database in the TFS instance

 TfsConfig recover /collectionDb:[SQLServerName\SQLInstanceName];Tfs_Restored /configurationDb:[SQLServerName\SQLInstanceName];Tfs_Configuration

- An error will occur 

Starting Host Restored
TF253021:The following team project is duplicated in at least two team project c
ollections: .... The collection cannot start while the duplication exists.
You must delete this project from all but one of the collections before the coll
ection can be started. The project exists in the following collections: ...

- From TFS Administrator Console, set the new mounted collection offline and rename it if necessary from "Edit Settings"

- Then your can finally attach your collection from TFS Administrator Console or CommandLine :

TfsConfig collection /attach /collectionDb:[SQLServerName\SQLInstanceName];"Tfs_Restored" /collectionName:"[Restored Collection Name]" /clone

- This project collection restored from a valid backup can now be use as a source collection for TFS Project Test Migrator

Last edited Aug 22, 2012 at 11:34 AM by buginbox, version 7

Comments

No comments yet.