Testopia:Documentation:CSV2XML: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
(Replaced content with '__NOEDITSECTION__ Back to the Testopia Main Page ==What's New!== csv2xml is now defunct as of Testopia 2.3. You can use the tr_importer.cgi to upload csv or xm…')
 
(2 intermediate revisions by one other user not shown)
Line 3: Line 3:


==What's New!==
==What's New!==
{| border=1 cellpadding=4
csv2xml is now defunct as of Testopia 2.3. You can use the tr_importer.cgi to upload csv or xml directly from within a test plan (file -> import -> cases).
| 2006-11-21 ||
* Page created
|-
|}


==Getting Started==
see import_example.csv and testopia.xsd in the extensions/testopia directory for more details.
 
The script tr_csv2xml.pl is provided in your Bugzilla home directory to convert Testopia CSV files into Testopia XML files for import using tr_importxml.pl.
 
Usage is tr_csv2xml.pl [ -tcdb] input.csv output.xml.
 
The flag -tcdb is used for CSV derived from a propriety Test Case Database that had a few bugs in it's export format which included:
 
* Does not escape " used in a field with "".  May use \" instead of "" but not always.
* Runs the CSV across multiple lines.
* In some cases a line may be missing the last field.
 
Most user's will not want to use the -tcdb flag.
 
==CSV File Format==
 
The first line of the CSV should contain a list of columns in the file separated by commas.
 
For example: "Testcase Name","Attributes","Priority","Description","Folder","Creator","Owner","Pass/Fail Definition","Setup Steps","Cleanup Steps","Steps"
 
Each column header is converted to lower case, white space is removed and the '/'s are removed and the result is compared against the following values to determine how the field should be handled.
 
*author - see owner.
*attributes - comma seperated list used to create a tag.
*category - category for test case.
*cleanupsteps - added to Break Down section.
*component - component for test case.
*description - summary unless testcasename is defined.  added to Action section if -tcdb flag used.
*environment - split apart at each comma to become a tag.
*folder - only processed if -tcdb option is supplied.  split apart at each '/'.  based on each teams input one field becomes the category and others tags.  each team defines which sub folders they want to use.
*longdescription - added to Action section if -tcdb flag used.
*owner (required) - in TCDB this is a ID that is mapped to a email address from the file tcdbUsers.
*passfaildefinition - added to Expected Results section.
*priority - becomes the priority.  I just a number P is prepended.
*result - see passfaildefinition.
*resdetails - added to Action section if -tcdb flag used.
*setupsteps - added to Set Up section.
*steps - added to Action section.
*summary - see testcasename.
*tags - see attributes.
*testcasename - becomes the summary.  if testcasename is not supplied the description is the summary.  if testcasename and description are both null a error is generated.  added to Action section if -tcdb flag used.
 
 
Any columns other than those described above are ignored.
 
==Samples==
 
<br>Back to the [[Testopia |Testopia Main Page]]

Latest revision as of 20:48, 27 October 2009

Back to the Testopia Main Page

What's New!

csv2xml is now defunct as of Testopia 2.3. You can use the tr_importer.cgi to upload csv or xml directly from within a test plan (file -> import -> cases).

see import_example.csv and testopia.xsd in the extensions/testopia directory for more details.