Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004122TestLinkTest Specificationpublic2010-12-23 05:432011-02-06 17:56
Reportertechieguy 
Assigned Tofman 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.9 (Prague) 
Fixed in Version1.9 (Prague) 
Summary0004122: Text in <> INSIDE CDATA, is ingnored while importing Test Case
DescriptionCreate a test case which has some text in <> and try importing it in the TL system, the text inside the <> is ignored.

e.g. cli <file name> in the test case step

When this is imported and you go and verify the test step in the test case its value is just : cli and not cli <file name>

but if its written as cli <1234> it works fine but doesnt works for a text/string value in the <>
Steps To Reproduce<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="SUIT">
<details><![CDATA[

]]></details>
<testcase name="ATS-1">
<summary><![CDATA[Verify configuration]]></summary>
<execution_type><![CDATA[2]]></execution_type>
<steps>
<step>
<step_number><![CDATA[1]]></step_number>
<actions><![CDATA[Run this file :]]></actions>
<expectedresults><![CDATA[Validate that all the configuration should be under this section.]]></expectedresults>
</step>
<step>
<step_number><![CDATA[2]]></step_number>
<actions><![CDATA[cli <file name>]]></actions>
<expectedresults><![CDATA[Validate that all the specifies MIB's path are correct.]]></expectedresults>
</step>
<step>
<step_number><![CDATA[3]]></step_number>
<actions><![CDATA[Go to cli and Run: <testdate> test]]></actions>
<expectedresults><![CDATA[ ]]></expectedresults>
</step>
<step>
<step_number><![CDATA[4]]></step_number>
<actions><![CDATA[show run full]]></actions>
<expectedresults><![CDATA[ ]]></expectedresults>
</step>
</steps>
</testcase>
</testsuite>
TagsNo tags attached.
Database (MySQL,Postgres,etc)NA
Browser
PHP Version
TestCaseID
QA Team - Task Workflow Status
Attached Files

- Relationships

-  Notes
(0013084)
fman (administrator)
2010-12-23 20:02

>> but if its written as cli <1234> it works fine but doesnt works for a text/string value in the <>

What does this means ?
(0013089)
fman (administrator)
2010-12-23 20:42
edited on: 2010-12-23 20:47

Find some info on net:
http://blog.evandavey.com/2008/04/how-to-fix-simplexml-cdata-problem-in-php.html [^]

http://bytes.com/topic/php/answers/520877-simplexml-cdata [^]

http://coffeerings.posterous.com/php-simplexml-and-cdata [^]

As workaround you can add an space after < and before > =>
<file> -> becomes < file >

I've tested and works

Other option replace <> with html entity

(0013091)
fman (administrator)
2010-12-23 21:52
edited on: 2010-12-23 21:53

This way works.
Seems some SimpleXML issue, but I was enable to find a similar report on
Internet.

<?xml version="1.0" encoding="UTF-8"?>

<testcases>
<testcase internalid="11" name="BOWL4">
    <node_order><![CDATA[102]]></node_order>
    <externalid><![CDATA[37]]></externalid>
    <version><![CDATA[1]]></version>
    <summary><![CDATA[&ltfile&gt]]></summary>
    <preconditions><![CDATA[&ltpreconditions&gt<333>]]></preconditions>
    <execution_type><![CDATA[1]]></execution_type>
    <importance><![CDATA[2]]></importance>

<custom_fields>
    <custom_field>
        <name><![CDATA[STRING]]></name>
        <value><![CDATA[]]></value>
    </custom_field> <custom_field>
        <name><![CDATA[TEXTAREA]]></name>
        <value><![CDATA[]]></value>
    </custom_field>
</custom_fields></testcase>
</testcases>

(0013178)
techieguy (reporter)
2011-01-06 11:45

Thanks for the solution it works,.
(0013183)
fman (administrator)
2011-01-06 11:54

We need to give info about this on documentation and/or change using of CDATA

- Issue History
Date Modified Username Field Change
2010-12-23 05:43 techieguy New Issue
2010-12-23 20:02 fman Note Added: 0013084
2010-12-23 20:42 fman Note Added: 0013089
2010-12-23 20:46 fman Note Edited: 0013089 View Revisions
2010-12-23 20:47 fman Note Edited: 0013089 View Revisions
2010-12-23 21:52 fman Note Added: 0013091
2010-12-23 21:53 fman Note Edited: 0013091 View Revisions
2010-12-23 21:54 fman Summary Text in <> is ingnored while importing Test Case => Text in <> INSIDE CDATA, is ingnored while importing Test Case
2011-01-06 11:45 techieguy Note Added: 0013178
2011-01-06 11:54 fman Note Added: 0013183
2011-01-06 11:54 fman Status new => resolved
2011-01-06 11:54 fman Fixed in Version => 1.9 (Prague)
2011-01-06 11:54 fman Resolution open => fixed
2011-01-06 11:54 fman Assigned To => fman
2011-02-06 17:56 fman Status resolved => closed



Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker