2

I want to import a test result on testlink. Here's my XML:

<?xml version="1.0" encoding="UTF-8"?>
<results>
    <testcase external_id="123-9" >
        <tester>sabrina</tester> <!-- tester LOGIN Name--->
        <timestamp>2014-05-12 17:00:00</timestamp>
        <result>p</result>
        <notes>functionality works great </notes>
    </testcase>
</result>

But it always fails with the notification result of 'xml_ko'.

Update: I found the solution. There are invalid characters i put on:

  1. <!-- tester LOGIN Name---> there's should only 2 dash (-) at the end.
  2. Missing 's' at the end on </result>

The right xml code:

<?xml version="1.0" encoding="UTF-8"?>
<results>
    <testcase external_id="123-9" >
        <tester>sabrina</tester> <!-- tester LOGIN Name-->
        <timestamp>2014-05-12 17:00:00</timestamp>
        <result>p</result>
        <notes>functionality works great </notes>
    </testcase>
</results>

4 Answers 4

2

I managed to upload my first test cases now. I stumbled also over the xml_ko a couple of times. At the end, I could nail it down to a control character in the name of one test case (don't know how it got there) and an ampersand in the name of another.
Checking the warnings and errors in "Events" helped quite a bit. For 'strange' characters I got and could locate the problem in (no surprise) line 233 of my XML file.

"Entity: line 233: parser error: Input is not proper UTF-8, indicate encoding! Bytes: 0x85 0x29 0x22 0x3E"

Maybe your "Events" helps with troubleshooting.

2
  • I have found the solution. There are invalid characters i put on: 1. <!-- tester LOGIN Name---> there's should only 2 dash (-) at the end. 2. Missing 's' at the end on </result> Commented May 26, 2014 at 3:12
  • I validate my XML code on xmlvalidation.com Commented May 26, 2014 at 3:27
0

If you are importing from MS Excel with macro into testlink, At the Name column of the excel avoid "&" sign replace & by and try to import.

0

I have faced the same problem.

Solution : You should verify your XML document. This warning occurs only when the xml file is not well formed.

Some symbols are not acceptable, for example, minus or hyphen, apostrophe, etc.

You don't use like - and ' directly.

You should use &#45; for - and &apos; for apostrophe.

This is very difficult to find and replace in large amount of data.

You can use validome.org for validating your xml file, so that you can find the errors easily.

0

Following things worked for me.

  1. I found some blank cases in my XML, remove any blank rows if present in xls template, after each case only 1 row is allowed.

  2. Choose correct level for addition

    1. Suite
    2. Sub-suite
    3. Cases-->For addition of bulk test case choose 2.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.