It's all about the answers!

Ask a question

Step Desc and Expected Result not seen while saving testscript from C#


Nilesh Bawalekar (221117) | asked Jan 15 '15, 8:07 a.m.

My XML Generated testscript in C# is :

<?xml version="1.0"?><testscript xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns=">http://purl.org/dc/elements/1.1/">TS_628AM</title><description xmlns=">http://jazz.net/xmlns/alm/v0.1/">2015-01-15T18:28:57.2984676+05:30</updated><state d2p1:resource="com.ibm.rqm.planning.common.new" xmlns:d2p1="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://jazz.net/xmlns/alm/v0.1/" /><creator d2p1:resource="nilesh.bawalekar" xmlns:d2p1="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/dc/elements/1.1/" /><owner d2p1:resource="unassigned" xmlns:d2p1="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://jazz.net/xmlns/alm/v0.1/" /><approvals /><scripttype>Manual</scripttype><variables /><steps><step description="Click on NGT icon" expectedResult="User should be able to click on icon" type="execution" xmlns=">http://jazz.net/xmlns/alm/qm/v0.1/testscript/v0.1/"><projectArea xmlns="http://jazz.net/xmlns/alm/qm/v0.1/" /><team-area xmlns="http://jazz.net/xmlns/prod/jazz/process/0.6/" /><stylesheet xmlns="http://jazz.net/xmlns/alm/qm/v0.1/" /><name>st2</name><link /></step></steps><datapool /><customAttributes /></testscript>

Its saving testscript in RQM , but also no. of steps are saved. but "Desciption" and "Expected result" feilds are showing blank from C# code. Above having 2 steps.

Please help.

One answer



permanent link
Paul Slauenwhite (8.4k12) | answered Jan 15 '15, 8:19 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Not sure I fully understand your issue.  However, your testscript XML is invalid (see https://jazz.net/products/rational-quality-manager/api-doc-5.0.1/schemas/qm_xsd/elements/testscript.html).  For example, qm:testscript/qm:steps/testscript:step/expectedResult and
qm:testscript/qm:steps/testscript:step/description are elements and not attributes.  See https://jazz.net/products/rational-quality-manager/api-doc-5.0.1/schemas/testscript_xsd/elements/step.html for more details.

Comments
Nilesh Bawalekar commented Jan 16 '15, 1:35 a.m.

For test script - step, xml source description and expectedresult fileld is :

<xs:complexType mixed="true">
<xs:sequence>
<xs:any maxOccurs="unbounded" minOccurs="0" namespace="http://www.w3.org/1999/xhtml" processContents="skip"/>
</xs:sequence>
</xs:complexType>

and while converting C# class from above xsd (xsdtocode tool) description/expected result fileld type as :
List<System.Xml.XmlNode>

Can please tell me how to pass or convert string data to above 2 fields as List of Syste.Xml.Xmlnode ?  I try converting in xml source above field to string and use it in C# code , but it saving as blank filelds.


Paul Slauenwhite commented Jan 16 '15, 7:37 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

Unfortunately, I'm not a C# developer and your C# issue is unrelated to CLM.  You may want to post your question to a Microsoft/C# newsgroup.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.