Wednesday, May 1, 2013

How To Create a Test Plans and Cases Migration Tool For TFS : Part 4

All my previous posts (part 1, Part 2, and Part 3) have covered the knowledge needed you to build a test plan migration tool for TFS. I put all those together and create a simple WPF project that you can find it here.
Tool has two operational modes.

1) Migration
2) Restore

In Migration mode it will copy test cases from source project to target project as well as test plans and suits.  tool will copy all test plans, suits and test cases from the source project and create Test plans, suits and  cases similar to source project. Not only test cases, it will also copy all test steps into test cases and duplicate shared steps that's linked to test cases. You can choose whether or not to duplicate shared steps. but if you choose not to include  shared test steps, software will not add any shared steps. 

But In Restore mode it will only copy test plans and suits. but it will connect appropriate test cases from querying existing work item collection(Restore mode is when you have all test cases in TFS, but lost test plans and have the option of restore those plans from an older test plan version).  This can be happen as deleting test plans only delete test plans and test suits and test cases will remain as they are work items. Therefore in this mode you won't need restoring test cases, shared steps, attachments.



Migration Mode
Connect to source and target project and select options you need.





























Halfway through the migration



























Migration completed



























check test plan,suit and case hierarchy























Restore Mode




























Limitations

One problem I was unable to solve is including links of Test cases to other work items while copying test cases when operating in Migration mode.
Including attachments part is still in progress. Also I hope to include copying iterations and areas in future. For now all the newly created test cases will be in 'New' status, not in their last recorded states. 

You can find the tool here,
https://tfstestpscexporter.codeplex.com

No comments:

Post a Comment