Cannot import testcases

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
bedginton
TestLink user
Posts: 4
Joined: Thu Sep 03, 2009 2:00 pm

Cannot import testcases

Post by bedginton »

I cannot import testcases into 1.8.3 in either xls or xml format. When I attempt to import using xml I get:

E_WARNING require_once(DOMDocument.class.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory - in /usr/local/share/testlink/lib/functions/common.php - Line 113

and if I attempt to import from xls I get:

09/02/2009 15:37:22 WARNING E_NOTICE Undefined variable: formatstr - in /usr/local/share/testlink/third_party/phpexcel/reader.php - Line 637 edge
09/02/2009 15:37:22 WARNING E_NOTICE Undefined offset: 3 - in /usr/local/share/testlink/lib/testcases/tcImport.php - Line 721 edge
09/02/2009 15:37:22 WARNING E_NOTICE Undefined offset: 4 - in /usr/local/share/testlink/lib/testcases/tcImport.php - Line 727

I have also attempted to just export one test case from TL and reimport it - same type of errors. I have searched the forums but can't find anything that may help me.

Thanks in advance,
-edge
Merch
TestLink user
Posts: 8
Joined: Thu Mar 19, 2009 7:26 pm

Post by Merch »

You need to install php-xml.
bedginton
TestLink user
Posts: 4
Joined: Thu Sep 03, 2009 2:00 pm

Post by bedginton »

%yum install php-xml
Package php-xml-5.2.9-2.fc10.x86_64 already installed and latest version

I already thought of that. Any other ideas?
Merch
TestLink user
Posts: 8
Joined: Thu Mar 19, 2009 7:26 pm

Post by Merch »

Did you restart apache after installing it?
bedginton
TestLink user
Posts: 4
Joined: Thu Sep 03, 2009 2:00 pm

Post by bedginton »

Yes, it made no difference. Same error importing either xml or xls.
bedginton
TestLink user
Posts: 4
Joined: Thu Sep 03, 2009 2:00 pm

Post by bedginton »

I've finally solved some of my issues and have successfully imported xml (xls is not worth troubleshooting now). What I found:
- attribute arguments have to be quoted <testcase name="XXXX"></testcase>
- < and > are not valid tokens for the TL xml parsing mechanism, they have to be < and > respectively.
- shortened forms of elements are legal <steps/> when there is no CDATA present
silvercolt45
Advanced user
Posts: 33
Joined: Tue Jan 20, 2009 4:57 pm
Location: Las Vegas
Contact:

Import and Export button not working

Post by silvercolt45 »

Hello, I thought I would jump in here and see if anyone had any clues to why our import capability isn't working for version 1.8.3. When attempting to import testcases, test suites or just a test case using an exported xml file from a different project the following two things happen depending on if using Firefox in Windows or Ubuntu.

1. Ubuntu. Upon clicking the Import button for any of the aforementioned exports a download dialogue box pops open asking if I want to save or open the tcImport.php file.

2. Windows. upon clicking the Import button for any of the aforementioned exports the main iframe in TestLink goes white with no action.

The only change I have made recently which I don't see how it could have any effect is that I added a method call in the tcEdit.php and exec.ini.php files to integrate an API client with a 3rd party application, this method call was added when a test case gets created or edited and when it gets executed.

Any ideas of why the import functionality is not working? Thank you!!
silvercolt45
Advanced user
Posts: 33
Joined: Tue Jan 20, 2009 4:57 pm
Location: Las Vegas
Contact:

HTTP Headers

Post by silvercolt45 »

Follow up to my previous post. I am still unable to import XML exports from a different project or within the same project for that matter. I have verified I am using the php4-to-php5 dom xml library. I have also watched the HTTP headers as I attempted to import the file. here is what the header contained (minus the actual xml data):

Code: Select all

http://testlink.qa.tss/lib/testcases/tcImport.php

POST /lib/testcases/tcImport.php HTTP/1.1
Host: testlink.qa.tss
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 GTBDFff GTB7.0 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://testlink.qa.tss/lib/testcases/tcImport.php?containerID=55458&bIntoProject=1&bRecursive=1&
Cookie: TL_lastTestProjectForUserID_44=55458; ys-tproject_55338_ext-comp-1001=a%3As%253A/55338/55380/55382; ys-tproject_55458_ext-comp-1001=a%3As%253A/55458/55774; PHPSESSID=667b5fad88d59dcd67e4d13dbebfd2cb
Content-Type: multipart/form-data; boundary=---------------------------1706055016738
Content-Length: 20441
-----------------------------1706055016738
Content-Disposition: form-data; name="importType"

XML
-----------------------------1706055016738
Content-Disposition: form-data; name="uploadedFile"; filename="testsuites.xml"
Content-Type: text/xml
Then here is the end of that same header after the xml data

Code: Select all

-----------------------------1706055016738
Content-Disposition: form-data; name="bRecursive"

1
-----------------------------1706055016738
Content-Disposition: form-data; name="bIntoProject"

1
-----------------------------1706055016738
Content-Disposition: form-data; name="containerID"

55458
-----------------------------1706055016738
Content-Disposition: form-data; name="MAX_FILE_SIZE"

1000
-----------------------------1706055016738
Content-Disposition: form-data; name="UploadFile"

Upload file
-----------------------------1706055016738--

HTTP/0.9 200 OK
Please help if you can, thank you!!
Locked