Import of CSV or xls file

The release related discussions, plans and questions.
prabhat
Advanced user
Posts: 19
Joined: Wed Apr 18, 2007 11:37 am

Import of CSV or xls file

Post by prabhat »

Can we import csv or xml file. Like if i had already have test cases written in excel sheet, so can i import that.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

use TL-XML format
drew
Advanced user
Posts: 23
Joined: Fri Jun 30, 2006 8:19 pm

Post by drew »

So is all .csv functionality gone in 1.7? This is kind of bad for me, because I had a really nice script for creating .csv files that worked great in TL1.6 from my custom data. :cry: I looked in the config file and did not see any way to enable .csv, I have not looked at the TL1.7 code yet. Got a .csv to xml converter script that worked for 1.6.x import schema .csv files?
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

I think we can add CVS import but just for Test Cases without ANY infor about Test Suite, or may be just parent Test suite.

Due to the new N-level container feature, CVS format is not a solution,
because is very difficult to express a variable number of levels.

Apologize, but we think N-level with XML is a better feature
prabhat
Advanced user
Posts: 19
Joined: Wed Apr 18, 2007 11:37 am

Post by prabhat »

I think CSV feature should be added, there should not ab any prob, if it is not having any info about the test suit. Because a user can inherit that test cases to some other test suit also(which is already there).
drew
Advanced user
Posts: 23
Joined: Fri Jun 30, 2006 8:19 pm

Post by drew »

All i need is to be able to import the individual test cases via csv under the individual suites. I'll select the suite manually, and import the individual test cases. Otherwise does anyone have a csv to xml converter which took the test case scheme from 1.6x as an input and outputs a xml file with 1.7.x format?
aTestLinker
TestLink user
Posts: 12
Joined: Tue May 01, 2007 7:04 pm

Post by aTestLinker »

fman wrote:use TL-XML format
What format is TL-XML format? I'm totally stuck on importing my test cases to TL 1.7.
I already have test cases written in Excel. I save the sheet as XML spreadsheet and try to import that file to TL 1.7. But after I browse the file and click import, only a white screen comes up and nothing gets imported. Exactly what kind of XML format do I need to import testcases? I check out your mantis site, but I'm not able to find an example of the required XML format.
Thanks.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

right now our documentation is not good.
To understand what is TL-XML format you just need to do this:

create a testproject, several test suites and several test cases.
use the XML export function on:
whole test project
a test suite
a test case

then you will have the XML file with the right format.

Exporting excel files on XML format, will not solve your problem
aTestLinker
TestLink user
Posts: 12
Joined: Tue May 01, 2007 7:04 pm

Post by aTestLinker »

Thank you so much for your fast reply.
I followed your suggestion and I've managed to transform my excel sheet to TL-XML format. It works when I upload the file on your demo site. However, on my site, after I click upload, nothing comes up. Just a white screen appears on that right pane (where we upload file), and no test cases get uploaded.
What else do I need to configure to get the uploading working?
aTestLinker
TestLink user
Posts: 12
Joined: Tue May 01, 2007 7:04 pm

Post by aTestLinker »

aTestLinker wrote:Thank you so much for your fast reply.
I followed your suggestion and I've managed to transform my excel sheet to TL-XML format. It works when I upload the file on your demo site. However, on my site, after I click upload, nothing comes up. Just a white screen appears on that right pane (where we upload file), and no test cases get uploaded.
What else do I need to configure to get the uploading working?
I'm using PHP 5.1.6, by the way.
drew
Advanced user
Posts: 23
Joined: Fri Jun 30, 2006 8:19 pm

Post by drew »

Can you post or send a sample excel sheet with some sample data so that I can see how you formated the excel sheet? I'm trying to do the same thing as you, and I have not had any free time yet to make a .csv to tl-xml converter, it might be faster to go the same route as you're doing at this point.
aTestLinker
TestLink user
Posts: 12
Joined: Tue May 01, 2007 7:04 pm

Post by aTestLinker »

drew wrote:Can you post or send a sample excel sheet with some sample data so that I can see how you formated the excel sheet? I'm trying to do the same thing as you, and I have not had any free time yet to make a .csv to tl-xml converter, it might be faster to go the same route as you're doing at this point.
You just need to create 1 or 2 testcases on using GUI. Then export those testcases...say, the exported file is testcases.xml. Open that .xml file with MS Excel. When you open it, choose the option "Use the XML source task pane". Then you will see the XML map in XML Source window. Click and drag the elements to the excel sheet. Eg. if you want name to be your first column, click and drag "name" element to 1A grid so that the column A will be "name" column.

After you try importing it, please tell me if that works. Importing still doesn't work on my site, although it works on TL demo site. It's still showing the blank white screen after i click upload to import.
mspaul
TestLink user
Posts: 10
Joined: Fri May 18, 2007 6:05 pm

Post by mspaul »

I have the same problem.

I tried uploading test cases and get a blank page.

Although, working on the Demo site.

Is there some configuration that need to be setup for this functionality to work?
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

You need to check is you have ALL PHP XML extension loaded.
Please do some search in this forum and in mantis about XML and import,
and you wll find some hints
aTestLinker
TestLink user
Posts: 12
Joined: Tue May 01, 2007 7:04 pm

Post by aTestLinker »

mspaul wrote:I have the same problem.

I tried uploading test cases and get a blank page.

Although, working on the Demo site.

Is there some configuration that need to be setup for this functionality to work?
I got the import working. My problem was that I had dom disabled in PHP configuration. I would suggest to try to print out phpinfo() and see if you have dom, xmlreader and xmlwriter enabled. If not, reconfigure your php with those enabled and reinstall php. Good luck!
Locked