Import Test Results with external ID

1.8 related questions and discussions.
Please upgrade to LATEST 1.9.x.
No more fixes for 1.8.

Moderators: Amaradana, TurboPT, TL Developers

Locked
Ann Rang
TestLink user
Posts: 3
Joined: Fri Jul 23, 2010 9:45 am

Import Test Results with external ID

Post by Ann Rang »

Hello,

I tried to import test results with the external ID but it doesn´t work.

This is the xml file I created:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<results xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<testcase>
<external_id>Test_AR-4</external_id>
<tester>ar</tester>
<result>p</result>
<notes>alles ok</notes>
</testcase>
<testcase>
<external_id>Test_AR-5</external_id>
<tester>ar</tester>
<result>f</result>
<notes>Fehler</notes>
</testcase>
<testcase>
<external_id>Test_AR-6</external_id>
<tester>ar</tester>
<result>b</result>
<notes>blockiert</notes>
</testcase>
</results>
When I try to import this file into TestLink the following message comes:
Import TestCase data : Test Case internal id= is not a number - results are not imported!
Import TestCase data : Test Case internal id= is not a number - results are not imported!
Import TestCase data : Test Case internal id= is not a number - results are not imported!
How can I import the results with the external ID?

Can somebody help, please?

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

Re: Import Test Results with external ID

Post by fman »

please open issue on mantis
LeeRenewData
Advanced user
Posts: 15
Joined: Fri Feb 09, 2007 11:34 pm
Location: Austin, TX

Re: Import Test Results with external ID

Post by LeeRenewData »

If this <external_id> is going into tcversions.tc_external_id the problem is that its an integer "int(10) unsigned" field.

I'm confused by the tcversions.tc_external_id too which I think is what the xml is referring too? I found bug http://mantis.testlink.org/view.php?id=3653 but it doesn't explain anything, just says to try the 1.9 beta.

We were writing automated test cases and results directly to the DB in 1.7.4. Now we're upgrading to 1.8.5 and not sure what to write into this required tcversions.tc_external_id field. I searched in the 1.8 Developers Guide but didn't find the answer. All the existing tests that were migrated from 1.7.4 to 1.8.5 had this new field populated with 0. But when I create tests and marked them as Automated this field gets an incrementing number inserted into it but I still don't know what it's for.

Here's a couple of related comments from install\migration\migrate_17\migrate_17_to_18_functions.php but its still not clear to me what the purpose is or what we should do with it.

20090717 - franciscom - updateTestCaseExternalID() - now external ID will
be aligned with internal ID.
There is code commented to allow users to use old method
where external ID was computed fresh from scratch.
Some times users do not like this solution because
breaks links done with other applications.

20090714 - franciscom - refactoring of updateTestCaseExternalID() to improve
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Import Test Results with external ID

Post by fman »

to fullfil users request (you can search on mantis removing hide status filter, because by default closed issues are not displayed and/or searched), there is a counter associated to each test project, that is incremented each time a test case is created, in this way all test cases inside a test project are sequential numbering.
Locked