Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005578TestLinkExport/Importpublic2013-03-20 13:562013-05-22 20:59
Reporterantoni 
Assigned Tofman 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version1.9.6 (2013 Q1 - bug fixing) 
Fixed in Version 
Summary0005578: Testlink upgraded from 1.8.5 to 1.9.6 - Test suite import doesn't work
DescriptionExport whole test suite from project A and save as .XML file
for example test suite contains test cases with following ID PrA-1, PrA-2
Open project B and import suite from project A.
in project B there are suite with test cases with following ID PrB-1, PrB-2
Despite that IDs are not the same PrA-1 and PrB-1, testcases with the same number in this case number 1 and 2 will not be imported
Test cases with the same number ID will not be copied. User gets following message:
": Can not be imported - You are hitting an existent Test Case with SAME EXTERNAL ID:"
None of three options for import do not work application always displays the same message that test cases cannot be imported
Steps To ReproduceOpen project A
Export suite as XML file
Open project B
Import XML file
Additional InformationTestLink is upgraded from 1.8.5 to 1.9.6
TagsNo tags attached.
Database (MySQL,Postgres,etc)MySql
Browser
PHP Version
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Filesxml file icon Movie.testsuite-deep.xml [^] (2,312 bytes) 2013-03-20 14:29
png file icon Import_test_suite_error.png [^] (72,398 bytes) 2013-03-21 15:50


xml file icon Login page.testsuite-deep.xml [^] (2,235 bytes) 2013-03-21 16:02
png file icon Import_1_.png [^] (53,224 bytes) 2013-03-22 14:34


png file icon Import_1_-_Error.png [^] (113,940 bytes) 2013-03-22 14:34


png file icon Import_2.png [^] (45,294 bytes) 2013-03-22 14:35


png file icon Import_2_-_error.png [^] (110,993 bytes) 2013-03-22 14:35


png file icon Import_3_.png [^] (31,492 bytes) 2013-03-22 14:35


png file icon Import_3_-_error.png [^] (119,424 bytes) 2013-03-22 14:36


png file icon Import_4.png [^] (30,705 bytes) 2013-03-22 14:36


png file icon Import_4_-_error.png [^] (119,107 bytes) 2013-03-22 14:36

- Relationships
parent of 0005586closedfman Test Specification Export - Add new option to DO NOT EXPORT Test Case External ID 

-  Notes
(0018503)
fman (administrator)
2013-03-20 13:59
edited on: 2013-03-20 14:01

Because this is NOT a fresh 1.9.6 installation, is important that you do same test on FRESH INSTALLATION, because issue can be related to migration.

everytime there is an issue with export/import feature I request that people provide the XML used.
Please provide the file

In addition issue subject has no value, does not work can means lot of different
things. Next time try to add some significant info, this does not mean that you
have to use subject to provide the whole details.

(0018505)
antoni (reporter)
2013-03-20 14:29

I have uploaded XML file
(0018507)
fman (administrator)
2013-03-20 18:46
edited on: 2013-03-20 18:48

no issue on fresh 1.9.6
1. create test project PRJ-A, EMPTY
2. import provided xml
3. create test project PRJ-B, EMPTY
4. import provided xml

No issue
Check if all your test projects have on test project table, the field prefix has a value different for each test project.

this seems to be some issue related to the current state of your database

if is not the case, you need to provide a very, very detailed step by step
instructions to recreate your scenario

(0018530)
antoni (reporter)
2013-03-21 16:01

Yes, You are right, there is no issue in case if XML file is imported in empty Project A. In case that there are already exists testcases in project A with prefix PrA-1, test case from Project B with prefix PrB-1 will not be imported

Steps to reproduce this issue:

1. Crate Project A
2. Create test case in Project A, test case has prefix PrA-1
3. Crate Project B
4. Create test cases in Project B, test cases has prefix PrB-1, PrB-2, PrB-3 and so on...
5. Export XML file from Project B and save it
6. Import XML file into project A
7. Test case with prefix PrB-1 is not imported because there is test case with prefix PrA-1
8. Test cases with prefix PrB-2 and PrB-3 is successfully imported
9. Please see attached screen shot "Import_test_suite_error.png"
10 Please see XML file "Login page.testsuite-deep.xml"
(0018531)
fman (administrator)
2013-03-21 16:13
edited on: 2013-03-21 16:20

I need complete detail of how you have filled the screen used to launch import.

Test case export does not contain test project prefix, just Test Case external id => the NUMBER (you can see this analizing XML file).

In your steps is not clear what do you expect will happen on test project A when you import XML test cases from test project B, if test cases with the same external ID (again just the number) already exists.

>> 8. Test cases with prefix PrB-2 and PrB-3 is successfully imported
what is really happening is that test cases with external id 2 and 3 are imported.
PRJB strings does not exist on XML FILE on test case EXTERNAL ID, just the number

(0018546)
antoni (reporter)
2013-03-22 10:26

I'll try to explain what should happens in case that user import test cases from Project B into project A when in Project A exists test cases with the same number.
So, this is my expectations, after all, import works on that way on old TestLink versions (i.e. 1.8.5)
When user import test cases into Project A, in my case user import 3 test cases with numbers 1, 2 and 3 into Project A where already exist test case with number 1,test case numbers should starts from next available number, in this case from number 2 and so on...
(0018547)
fman (administrator)
2013-03-22 13:03

1. still waiting for info about HOW import has been launched, in order to
understan if some option can help you
2. TL works in a new way, and this is not an issue but a design choice
(0018548)
antoni (reporter)
2013-03-22 14:34

Import has been launched by choosing project, XML file and combination of options from drop-down lists
First import: chosen combination is:
Consider Test Case as duplicate if has the same name
Action for duplicates Create a new test case with different title
After pressing Upload button TL displays message (see Import_1_-_Error.png)

Second import: chosen combination is:
Consider Test Case as duplicate has same Internal ID
Action for duplicates Create a new test case with different title
After pressing Upload button TL displays message (see Import_2_-_Error.png)

Third import: chosen combination is:
Consider Test Case as duplicate if has same External ID
Action for duplicates Create a new version
After pressing Upload button TL displays message (see Import_3_-_Error.png)

Fourth import: chosen combination is:
Consider Test Case as duplicate if has same External ID
Action for duplicates Create a new test case with different title
After pressing Upload button TL displays message (see Import_4_-_Error.png)

As You can see TL always displays the same message, no matter what was selected from drop-down lists
(0018549)
antoni (reporter)
2013-03-22 14:41
edited on: 2013-03-22 14:43

Could You please explain me, what I should to do in order to import testcases with the same number? I can't figure out how this new flow for import works.
Thanx in advance

One more thing, there is no any error message in the log files.

(0018561)
fman (administrator)
2013-03-23 09:15
edited on: 2013-03-23 09:55

What is happening is right and follow a design rule:

1. External ID has to be UNIQUE inside a test specification.
2. External ID is intended as a KEY ATTRIBUTE that user wants to preserve, then
when creating a new test case through import process TestLink wants to set the External ID to the value provided on XML file.

TestLink will block creation of with a new test case, with an existent EXTERNAL ID, if parent containers (test project/test suites) are different.
Example:
Test Project: ALFA, prefix: AA
Test Suite TS-100 contains Test Case AA-10.
Create Test Suite TS-200, and try to import an XML file where a test case with external id 10 exists. => TestLink will block IMPORT because consider
that if you have provided external ID you WANT TO USE it.
But you can not have same external ID under different Test Suites.
You can also can have TWO Test Case with same External ID under same Test Suite,
test link will try to update it, create a new version, ore create a new test case with DIFFERENT (automatic generated) TITLE and NEW External ID

Before addition of the logic to preserve Test Case External ID, there was a
different effect:
no matter if NO TEST CASE already Exists, with the External ID you were providing TestLink will replace the external id it got from xml file, with a new one.

That's reason for implementation of this new logic (you can search for issue on mantis to get more details, just remember to remove status filter or closed issue will not be displayed).

(0018562)
fman (administrator)
2013-03-23 09:18
edited on: 2013-03-23 09:58

two options
A. Remove all info regarding external ID
(example <externalid><![CDATA[1]]></externalid>)
from XML file, and retry.
This will import all test cases with new 'fresh' external ID.

B. get latest fix, that will create export XML without external ID
(see related issue)

(0018564)
fman (administrator)
2013-03-23 09:58

Design choice.
(0018572)
antoni (reporter)
2013-03-25 10:44

Where I can find TestLink with latest fix? Is this latest fix included in version on the http://sourceforge.net, [^] or this fix will be included in version 1.9.7 as You said in ticket 0005586.
(0018576)
fman (administrator)
2013-03-25 13:23
edited on: 2013-03-25 13:24

On this site there is an issue with this subject:
Availables hot-fixes for 1.9.6 & How To get full fixed package from gitorious

Pay attention to related issues also (this issue has one)


- Issue History
Date Modified Username Field Change
2013-03-20 13:56 antoni New Issue
2013-03-20 13:59 fman Note Added: 0018503
2013-03-20 13:59 fman Status new => feedback
2013-03-20 14:00 fman Summary Test suite import doesn't work => Testlink upgraded from 1.8.5 to 1.9.6 - Test suite import doesn't work
2013-03-20 14:01 fman Note Edited: 0018503 View Revisions
2013-03-20 14:29 antoni File Added: Movie.testsuite-deep.xml
2013-03-20 14:29 antoni Note Added: 0018505
2013-03-20 14:29 antoni Status feedback => new
2013-03-20 18:46 fman Note Added: 0018507
2013-03-20 18:48 fman Note Edited: 0018507 View Revisions
2013-03-20 18:48 fman Assigned To => fman
2013-03-20 18:48 fman Status new => feedback
2013-03-21 15:50 antoni File Added: Import_test_suite_error.png
2013-03-21 16:01 antoni Note Added: 0018530
2013-03-21 16:01 antoni Status feedback => assigned
2013-03-21 16:02 antoni File Added: Login page.testsuite-deep.xml
2013-03-21 16:13 fman Note Added: 0018531
2013-03-21 16:15 fman Note Edited: 0018531 View Revisions
2013-03-21 16:15 fman Note View State: 0018531: public
2013-03-21 16:18 fman Note Edited: 0018531 View Revisions
2013-03-21 16:19 fman Note Edited: 0018531 View Revisions
2013-03-21 16:19 fman Note Edited: 0018531 View Revisions
2013-03-21 16:20 fman Note Edited: 0018531 View Revisions
2013-03-22 10:26 antoni Note Added: 0018546
2013-03-22 13:03 fman Note Added: 0018547
2013-03-22 14:34 antoni Note Added: 0018548
2013-03-22 14:34 antoni File Added: Import_1_.png
2013-03-22 14:34 antoni File Added: Import_1_-_Error.png
2013-03-22 14:35 antoni File Added: Import_2.png
2013-03-22 14:35 antoni File Added: Import_2_-_error.png
2013-03-22 14:35 antoni File Added: Import_3_.png
2013-03-22 14:36 antoni File Added: Import_3_-_error.png
2013-03-22 14:36 antoni File Added: Import_4.png
2013-03-22 14:36 antoni File Added: Import_4_-_error.png
2013-03-22 14:41 antoni Note Added: 0018549
2013-03-22 14:43 antoni Note Edited: 0018549 View Revisions
2013-03-22 19:20 fman Note Added: 0018556
2013-03-22 19:21 fman File Added: import-on-alfa-empty.png
2013-03-22 19:21 fman File Added: after-import-on-alfa.png
2013-03-22 19:22 fman Note Edited: 0018556 View Revisions
2013-03-22 19:22 fman File Added: after-import-beta.png
2013-03-22 19:22 fman Note Edited: 0018556 View Revisions
2013-03-23 09:15 fman Note Added: 0018561
2013-03-23 09:18 fman Note Added: 0018562
2013-03-23 09:25 fman Relationship added parent of 0005586
2013-03-23 09:37 fman Note Edited: 0018561 View Revisions
2013-03-23 09:49 fman Note Edited: 0018561 View Revisions
2013-03-23 09:49 fman Note Edited: 0018561 View Revisions
2013-03-23 09:50 fman Note Edited: 0018561 View Revisions
2013-03-23 09:55 fman Note Edited: 0018561 View Revisions
2013-03-23 09:56 fman Note View State: 0018561: public
2013-03-23 09:56 fman File Deleted: after-import-beta.png
2013-03-23 09:56 fman File Deleted: import-on-alfa-empty.png
2013-03-23 09:56 fman File Deleted: after-import-on-alfa.png
2013-03-23 09:57 fman Note Deleted: 0018556
2013-03-23 09:58 fman Note Edited: 0018562 View Revisions
2013-03-23 09:58 fman QA Team - Task Workflow Status TBD => READY FOR TESTING
2013-03-23 09:58 fman Note Added: 0018564
2013-03-23 09:58 fman Status assigned => resolved
2013-03-23 09:58 fman Resolution open => no change required
2013-03-25 10:44 antoni Note Added: 0018572
2013-03-25 13:23 fman Note Added: 0018576
2013-03-25 13:24 fman Note Edited: 0018576 View Revisions
2013-05-22 20:59 fman Status resolved => closed



Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker