Importing cases from QC

Jan 14, 2010 at 9:37 PM

I have a lot of test cases to move.  The published implementation of the utility assumes one test case per line making it worthless for importing test cases exported from QC.  I modified the code to import test cases that span more than one row in the spreadsheet.  Also fixed the filtering on the dialogs to restrict to the appropriate file type.  My other issue with MTLM is that the interface creates a new test step if you hit the enter key and there doesn't seem to be any sequence like there is in Excel to embed a carriage return in the cell.  Copy/paste doesn't do it either and it really can mess up the test case with the columns getting mixed up.  Importing from Excel gets around this issue.  Much faster now.

Coordinator
Jan 15, 2010 at 2:13 PM
Edited Jan 15, 2010 at 2:15 PM

I am glad you had some success with the tool and were able to modify the code to fit your needs.

The ability to enter a carriage return into a cell through the UI has been reported but it just didn't make the cut. 

Would you mind submitting a patch for the changes you made?

Thank you for the feedback.

Coordinator
Jan 21, 2010 at 5:40 AM
Edited Jan 21, 2010 at 6:14 AM

TestCaseMigrator assumes that the occurrence of any value in the column mapped to TCM Mandator Field(for examle 'Title' is mandatory field in Default TCM Testcase Template) would be a start of new testcase. So please make sure that your Title column is not having repetitive values in the column cells. Generally one can get this if he has used sql query to join two tables and then exported it to the Excel.

 

Jan 21, 2010 at 12:53 PM
jasstheone wrote:

TestCaseMigrator assumes that the occurrence of any value in the column mapped to TCM Mandator Field(for examle 'Title' is mandatory field in Default TCM Testcase Template) would be a start of new testcase. So please make sure that your Title column is not having repetitive values in the column cells. Generally one can get this if he has used sql query to join two tables and then exported it to the Excel.

 

 The issue was not the way QC exports test cases to excel (right click->Export) which creates 4 columns (attachment, step name, action and expected results.  The issue was with the import utility which assumed each line in Excel was a new test case.  I replaced the Step Name with the test case name. and mapped accordingly  Using the import tool as posted this created multiple test cases with the same name. 

I have modified the tool code so the it goes through each line item and checks the title of the previous line.  If the test case name is the same, it creates a second step in the current test case.  Similarly if the title column is blank. This is the same behaviour as QC's Excel import plug-in.  Other things I have fixed are to add filters to the dialogs so I don't have to wade through a lot of unrelated files to find the right one (basic good programming practice), by-passed the welcome screen, and changed the default on the column mapping page to use an existing file.  Lets get real, anyone who does this a lot is going to have a single mapping file they use repeatedly so the default should reflect that.

The way the tool is written it takes a minimum of 14 clicks to import a test case.  I have it down to 11 right now and will have it down to 9 before the week is out.  Next week's goal is to get to 6 clicks and then to either multi-select spreadsheets and/or go back to the first selection screen without having to restart.  The goal of a tool should be ease of use and speed.  Something that appears to be lacking in most program designs these days.

Why go to all this work?  I have close to 1000 test cases to move.  Copy/paste and the mess that created would have taken weeks of tedium that could be spent testing.  The tool with my changes cuts it to a couple of weeks.  The last set of changes I want to make will cut it to a couple of days.  So one day fixing the import utility saves countless weeks of time.  Yes a query at this point to generate one large spreadsheet is a possibility, but I have this funny need to actually organize my test cases (a concept seemingly lost in TFS) and wading through a list of hundreds trying to get them organized is as much work, and easier to miss one, than moving cases is small batches and organizing at the same time.