Export Test Cases from Excel to TFS

Manjula Chetty, 02 December 2014

There are many testers who prefer to write test cases in excel as it is easier and one can view all the test cases in one single page and then copy it across to TFS. Copying test cases from Excel to TFS one by one is a very time consuming task. The alternative to that would be using Test case Migrator Tool to export test cases from Excel to TFS.

"Test Case Migrator Plus" (Excel/MHT) Tool

Test Case Migrator Plus can copy multiple test cases from excel to TFS in matter of seconds thus making everyone’s life easy and simple. You can download the tool from here.

Following are the Prerequisites:

For Visual Studio 2010: 

Before you can run the “Binaries for VS2010 - Test Case Migrator Plus V1.2 RTM” tool, both the following pre-requisites need to be present on the machine. Without these, the tool will not function.

•  Microsoft Visual Studio 2010 RTM/SP1 bits
     •  Microsoft Visual Studio 2010 Ultimate Edition RTM (Web Install) (OR)
     •  Microsoft Visual Studio 2010 Premium Edition RTM (Web Install) (OR)
     •  Microsoft Visual Studio Test Professional RTM (Web Install) AND Microsoft Visual Studio 2010 Team Explorer (ISO) Explorer (ISO)
•  Version of Microsoft Office 2003 or beyond


For Visual Studio 2012:

Before you can run the “Binaries for VS2012 - Test Case Migrator Plus V1.2 RTM” tool, both the following pre-requisites need to be present on the machine. Without these, the tool will not function.

•  Microsoft Visual Studio 2012 bits
     •  Microsoft Visual Studio 2012 Ultimate (Web Install) (OR)
     •  Microsoft Visual Studio 2012 Premium (Web Install) (OR)
     •  Microsoft Visual Studio 2012 Test Professional (Web Install)
•  Version of Microsoft Office 2003 or beyond<


Following is a step by step process to export test cases to TFS from Excel
:

1.  Create Test cases in the following format:

Export Test Cases from Excel to TFS

Test Case Source ID: ID of the Test case.

Test Name: It’s the name of the Test Case which will appear as Title in TFS

Test Description: Will appear in Description field on Summary tab in TFS

Test Folder Hierarchy: The folder you want the test case to be moved to

Assigned To: Assigned To field in TFS

Status: Status of the Test case (Design, Ready etc.)

Priority: Priority of a test case

Suites Hierarchy: Top Hierarchy (Project name)

Related Test Case Source IDs: Can relate the test case to multiple test cases if need be and they will be in links tab in the test case

Linked Requirement Source IDs: Can relate the test case to multiple requirements if need be and they will be in links tab in the test case

Date: The date when you import the test case

2.  Open the Test Case Migrator plus and you will be greeted with the following which gives you information about what work item types can be migrated to TFS from Excel and other important information

Export Test Cases from Excel to TFS

3.  Click Next and select the excel sheet by browsing to the location its saved on your machine

Export Test Cases from Excel to TFS

4.  Select the TFS folder location where you want the test case to be exported to, the suite hierarchy specified in the Test Case and click on next.

Export Test Cases from Excel to TFS

5.  In the Settings tab select the option Load from an existing file and select the settings file “MyTestCaseSettingsFile.xml” downloaded when you downloaded the setup and click on next to begin parsing the test cases

Export Test Cases from Excel to TFS

6. In Field Mapping tab select Date as Changed Date*+ and click on next  and the Data Mapping tab should be displayed after the parsing is done of all the test cases present in the sheet.

Export Test Cases from Excel to TFS

7.  In Data Mapping tab deselect the checkbox for “Create area/iteration path from source values” and click on next

8.  In Links Mapping tab select the checkbox for “Create links between work items” if you want to link the test cases and requirements. For this example let’s not select the checkbox and click on next

9.  Miscellaneous section shows where the settings file and log files will be located. Click on Next

10.  Click on Save and Migrate if you want to see the output file at the end of migration.

11.  The count of Errors and Warnings will be incremented depending on the test cases with errors and warning respectively. You can view the test cases in the Session Output log file and it contains test cases which have not been migrated under Errors tab and which have been migrated under Passed and Warning tab.

Export Test Cases from Excel to TFS

12.  Errors tab gives you complete information about why the test cases failed the migration. Rectify those errors and migrate the test case with errors again.

13.  Go to TFS and follow the path in test folder hierarchy tab and your test cases should be imported to TFS.