How to migrate the test cases from an excel to TFS

Tarun Kumar Chatterjee
 
Net – Technology Specialist
February 26, 2016
 
Rate this article
 
Views
18482

In one of my project requirement it was said to upload all the test cases to TFS, I had an excel version. After doing a round of research found a way out of using a free 3rd party tool to achieve the requirement & the tool named is “Test Case Migrator Plus”. Thought of sharing with you if it helps anyone.

I downloaded the exe from: https://tcmimport.codeplex.com/releases/

Let’s see the steps to import the test cases from excel to TFS

Open the TFS and create a folder (not necessary) where you want to upload the test cases (for e.g.Test Plan)

Add a test plan named as “Test Site Test Plan”

clip_image001

Here is the dummy specie of test cases excel sheet I used.

clip_image003

One important field is ‘Path’ which will contain the folder name (or Test Plan name) and the other is ‘Date’.

Now in Test Case Migrator Tool and click on next.

clip_image005

Select the test case excel & next.

Directly downloaded “TestCaseMigrationPlus” software also was not working in our case, it was throwing below error:

clip_image007

Now as a solution what I did:

Downloaded the source code and apply the patches from: https://tcmimport.codeplex.com/SourceControl/list/patches. Rebuild the application and then import the excel again.

clip_image009

Click on next and confirm at the end and test cases would be uploaded at the TFS URL where you want it.

clip_image011

Click on next.

clip_image013

Now mapped the fields accordingly. Please note that it’s not necessary to mapped all the fields but make sure that you mapped the mandatory fields (Title & Changed Date). Also, need to select Test suits as “Path”. You can refer the below screen shot for reference.

clip_image015

Click on next.

clip_image017

Click on next & unselect Create links between work items.

clip_image019

Click on next.

clip_image021

Click on next.

clip_image023

Click on Save and migrate.

clip_image025

Refresh the TFS link, the test cases will be imported to TFS successfully.

clip_image027

Open any one of the test case & check if the Action & expected result showing the data properly.

clip_image029

To run the test case you will have to right click on test case & run. To make it Pass you will have to select the test case & click on the “Pass test” button.

clip_image031

Hence go to the TFS and check that test cases are uploaded or not. On successful upload repeat the same process for other test cases.

 

Happy Coding

Tarun Kumar Chatterjee

Category : .Net

Author Info

Tarun Kumar Chatterjee
 
Net – Technology Specialist
 
Rate this article
 
Tarun has been working in IT Industry for over 12+ years. He holds a B-tech degree. He is passionate about learning and sharing the tricks and tips in Azure, .Net ...read more
 

Leave a comment