Testopia:Documentation:CSV2XML
Back to the Testopia Main Page
What's New!
| 2006-11-21 |
|
Getting Started
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
Back to the Testopia Main Page