|Anonymous | Login | Signup for a new account||2018-12-19 14:39 UTC|
|Main | My View | View Issues | Change Log | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005812||TestLink||Export/Import||public||2013-07-15 10:08||2013-09-08 17:55|
|Product Version||1.9.6 (2013 Q1 - bug fixing)|
|Fixed in Version||1.9.8 (2013 Q3 - bug fixing)|
|Summary||0005812: Can not be imported - You are hitting an existent Test Case with SAME EXTERNAL ID|
We were able when using version 1.9.2 to export and import test spécifications but until 1.9.6 we got the following result error:
"Can not be imported - You are hitting an existent Test Case with SAME EXTERNAL ID:...."
This situation is really serious, because not only we cannot import test-plans within the same project but we can’t also among different projects (and we were doing this all the time).
This is really a blocking point, because most of our new test-plans are based on old ones, if we can’t import them, we need to write them all again, that will take a toll of several man/days of work per project.
Thanks in advance
|Steps To Reproduce||Export a test specification from one project|
Import that xml file to another project
|Tags||No tags attached.|
|QA Team - Task Workflow Status||READY FOR TESTING|
|Attached Files|| ts-external-id.png [^] (21,141 bytes) 2013-07-18 18:40
When comparing to previous version, we cans see that there is a specific bloc code that we can disable within IMPORT/lib/testcases/tcImport.php
by commenting the following but we do not know why this proteection is for and what it is preventing anf if we are going to create problems by doing so...
if( $doCreate )
// Want to block creation of with existent EXTERNAL ID, if containers ARE DIFFERENT.
$item_id = intval($tcase_mgr->getInternalID($externalid, array('tproject_id' => $tproject_id)));
if( $item_id > 0)
// who is his parent ?
$owner = $tcase_mgr->getTestSuite($item_id);
if( $owner != $container_id)
// Get full path of existent Test Cases
$stain = $tcase_mgr->tree_manager->get_path($item_id,null, 'name');
$n = count($stain);
$stain[$n-1] = $tcasePrefix . config_get('testcase_cfg')->glue_character . $externalid . ':' . $stain[$n-1];
$stain = implode('/',$stain);
$resultMap = array($name,$messages['hit_with_same_external_ID'] . $stain);
$doCreate = false;
1. this issue is a duplicate, please do some searches before posting
2. details steps to reproduce are missing
3. xml example files are missing
Hi, please find hereafter my answers:
1: I tried to find some solution here and on another places, without any success. Our problem is more about Test Suite than test cases because we need to import a bunch or more that 500 test cases within test suites and that for a lot of test suites.
So such solution/method like this found here http://www.teamst.org/forum/viewtopic.php?f=17&t=6732&sid=edee2d6111ff5be065348a95e2b254ff [^] seems not helping when trying to import test suites. Test suites has no preconditions for example.
2: How to reproduce:
- i simply created a new test suite with one test case, then exported it using xml and default settings (export resquirements...).
- then i create a new test suite, then try to import the previously exported xml file using default settings, and got the following error message with nothing imported at the end:
Test Case : testcase1 : Can not be imported - You are hitting an existent Test Case with SAME EXTERNAL ID:NICOLAS TEST/25-2683:testcase1
3: Here is the xml file:
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="NICOLAS TEST" >
<testcase internalid="312242" name="testcase1">
I found the code responsible for that when comparing with version 1.9.2 (detailed on my previous post), i can deactivate it but wanna to understand why this is for, and if i'm going to got into troubles by doing so...
>>2: How to reproduce:
>> - i simply created a new test suite with one test case, then exported it >>using xml and default settings (export resquirements...).
>> - then i create a new test suite, then try to import the previously >>exported xml file using default settings, and got the following error message >>with nothing imported at the end:
this scenario is not the firts you reported.
Export a test specification from one project
Import that xml file to another project
What is happening is right, because if you provide externalID, (currently there is no option to not export it) TL tries to use it.
Then this is NOT an error
Let me try to be understood with another words.
This is still the same ticket simply "reopened" as i'm trying to be understood and getting some help...
we are using Testlink a lot, with a lot of tests cases within a lot of test suites for a lot of projects...
One way we found in the past to save time instead of recreating all tests suites and tests cases manually, was to export test spécifications that are common for some projects and import it where they are needed.
It was working at least for version 1.9.2.
Since we upgraded to version 1.9.6 it does not work anymore, because of some code identified and mentionned above within "tcImport.php".
I'm pretty sure that if that code is here it is for some good reasons and not an error.
My question is, for what that particular code is protecting for ? Are i'm going in trouble if i simply comment or change it ("$doCreate = false;")?
Or, is there another way to do that, that is to say keep basic requirements common to many project instead of recreating all of these manually as it was possible in the past ?
edited on: 2013-07-17 09:45
For example if i change $doCreate = false to $doCreate = true, we will got same external id for tests that are related to another project, that could be a problem...
Another solution would be to delete all external ID with reg ex before importing it, but this is not a short way as we got a lot of references and all users need to be aware of that and if they forgot we will be in first problem described, that is to say a wrong external id...
I guess that if there is an import button it is to manage that but we are going into troubles...
Thanks in advance for any help you would be pleased to give.
edited on: 2013-07-17 09:55
>> I'm pretty sure that if that code is here it is for some good reasons and not >> an error.
>> My question is, for what that particular code is protecting for ? Are i'm
>> going in trouble if i simply comment or change it ("$doCreate = false;")?
I've a really limited time to do this kind of explanations, and just this way I'm going to do it.
If you search for issues (IGNORING STATUS) that have something to do with external ID you are going to find 0005309
in this issue and related issue I think your are going to understand why I have done the changes.
If you give a look to 1.9.7 features you may be can finb ghost test cases and ghost steps useful for you.
If you really find TL useful, think about providing some support to our work
|on latest code present on gitorious you will find an option TO DO NOT EXPORT external ID (see attached image)|
|2013-07-15 10:08||nlebihan||New Issue|
|2013-07-15 14:08||nlebihan||Note Added: 0019252|
|2013-07-15 15:45||fman||Note Added: 0019254|
|2013-07-15 15:45||fman||Status||new => resolved|
|2013-07-15 15:45||fman||Resolution||open => duplicate|
|2013-07-15 15:45||fman||Assigned To||=> fman|
|2013-07-16 08:39||nlebihan||Note Added: 0019266|
|2013-07-16 11:57||nlebihan||Status||resolved => assigned|
|2013-07-16 11:57||nlebihan||Resolution||duplicate => reopened|
|2013-07-16 13:51||fman||Note Added: 0019268|
|2013-07-16 13:52||fman||Status||assigned => resolved|
|2013-07-16 13:52||fman||Resolution||reopened => no change required|
|2013-07-17 09:31||nlebihan||Note Added: 0019277|
|2013-07-17 09:32||nlebihan||Status||resolved => assigned|
|2013-07-17 09:32||nlebihan||Resolution||no change required => reopened|
|2013-07-17 09:43||nlebihan||Note Added: 0019278|
|2013-07-17 09:45||nlebihan||Note Edited: 0019278||View Revisions|
|2013-07-17 09:51||fman||Note Added: 0019279|
|2013-07-17 09:54||fman||Note Edited: 0019279||View Revisions|
|2013-07-17 09:55||fman||Note Edited: 0019279||View Revisions|
|2013-07-17 09:55||fman||Note View State: 0019279: public|
|2013-07-18 18:40||fman||Note Added: 0019294|
|2013-07-18 18:40||fman||QA Team - Task Workflow Status||TBD => READY FOR TESTING|
|2013-07-18 18:40||fman||Status||assigned => resolved|
|2013-07-18 18:40||fman||Fixed in Version||=> 1.9.8 (2013 Q3 - bug fixing)|
|2013-07-18 18:40||fman||Resolution||reopened => fixed|
|2013-07-18 18:40||fman||File Added: ts-external-id.png|
|2013-07-18 18:41||fman||Relationship added||child of 0005731|
|2013-09-08 17:55||fman||Note Added: 0019544|
|2013-09-08 17:55||fman||Status||resolved => closed|
|Copyright © 2000 - 2018 MantisBT Team|