Import/export results.

LATEST Official version.
Questions and discussions - NO ISSUES
FOR ISSUES => http://mantis.testlink.org

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
btowle
TestLink user
Posts: 11
Joined: Wed Sep 19, 2012 7:54 pm

Import/export results.

Post by btowle »

So I need to export a set of results. I found out how to enable the bulk handling and export all of the test results, however, I have to be able to add them back into my project. I was very disappointed when I discovered the export "bulk" results is NOT compatible with the expected format of the import results. (I don't know if this is bug or not)... But I learned that the import results could handle more than one testcase so I wrote my own exporter. I am printing out the information regading the testcase id and such to the website. I can generate the expected xml file. However when I try to import it says "Import TestCase data : Test Case X no foudn in test plan- results are not imported!".

I tried this with the external id, the test case id, and the result id. I verified that these values were accurate via the test suite/testcase manager objects.

Here is simple example of the xml file I created:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<results>
  <testcase id="4">
    <tester>btowle</tester>
    <timestamp>2012-09-20 15:46:39</timestamp>
    <result>b</result>
    <notes></notes>
  </testcase>
</results>


Again I have tried it with "external_id" as well with no avail.

What is suppose to go in the testcase id and where do I find it? Shouldn't it be $RESULT['testcase_id'] or $RESULT['tc_external_id'] where $RESULT is the key,value dictionary for a particular result? I could not find any other post regarding this, I know it is an edge use case where you have to import/export results but I was hoping someone has dealt with this before.

Thanks,

Btowle
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Import/export results.

Post by fman »

As already suggested (yesterday) on mantis on http://mantis.testlink.org/view.php?id=5232, all info you need is present on file
tl-file-formats.pdf, present on TestLink distribution. ALl you need is read section 2.8 Results Import.

Just for the records: Test Plan export has been developed AFTER, results import and it's focus is different.
If you feel EXPORT format need to changed in order to support import, best thing you can do for community, is stop complaining
(>>I was very disappointed when I discovered the export "bulk), and report a feature request with a detailed explanation, examples and use case on our mantis site.
Again just for the records: on all the years I've been enjoying other people work (using apache, PHP, mantisbt, smarty, etc) never cross my mind
to be very dissapointed by some decision they take, because I've appreciated their free contribution to make may dev life better.
btowle
TestLink user
Posts: 11
Joined: Wed Sep 19, 2012 7:54 pm

Re: Import/export results.

Post by btowle »

You are correct, I am sorry,
Lesson learned, never post while debugging.

I am using section 2.8 for formatting the xml. Am I missing something on the formatting? It looks correct to me.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Import/export results.

Post by fman »

Firts thing: how do you have exported results with STANDARD testlink ? I'm not able to find any place where test case with execution results can be exported.

In order to help you I need
1. test project exported in XML format
2. test plan exported in XML format
3. any other item you have used that can be exported, exported in XML format
4. the file with results that you are not able to import.

put all this in a zip file and send it via mail to: testlink.forum@gmail.com
btowle
TestLink user
Posts: 11
Joined: Wed Sep 19, 2012 7:54 pm

Re: Import/export results.

Post by btowle »

okay, really stupid question, where do you go to export a project? I can export test plan, testsuite, and individual test case, but I don't see a button for exporting a project.
Post Reply