It's all about the answers!

Ask a question

RQM API :How to link existing testscript with newly created testcase


Khajan Pandey (156) | asked Sep 23 '20, 11:45 p.m.
edited Sep 23 '20, 11:45 p.m.

I am using PUT method to create testcase and link an existing testscript . I am sending below xml with request .

I am able to create testcase on each run but testscript is not getting linked . Please suggest if xml is missing some property ? hope this should be possible .

<?xml version="1.0" encoding="UTF-8"?>
<id>https://<server>.com/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<id>/testcase</id>
<ns4:title>TestCase</ns4:title>
<ns4:description>Test Case Creation through Rest API</ns4:description>
<ns5:state>com.ibm.rqm.planning.common.new</ns5:state>
<weight>100</weight>
<ns2:variables/>
<ns2:scriptStepCount>1</ns2:scriptStepCount>
<ns2:testscript href="https://<server>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<id>/testscript/urn:com.ibm.rqm:testscript:1170"/>
<ns2:template href="https://<server>.com/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<id>/template/testcase/com.ibm.rqm.planning.templates.testcase.default"/>
<variables/>
</testcase>


Thank you in advance .

Accepted answer


permanent link
Dani Simon (70114) | answered Sep 24 '20, 2:43 a.m.
edited Sep 24 '20, 2:44 a.m.

 Hi 


which response do you get by your request? 
I think testscript is in your case not in namespace ns2. So far as I know it use the namespace: "http://jazz.net/xmlns/alm/qm/v0.1/". Also template shouldn't be in ns2.... 

In your case ns2 is declared as "http://schema.ibm.com/vega/2008/". Not sure if this is the problem... 

regards,
Dani


Khajan Pandey selected this answer as the correct answer

Comments
Khajan Pandey commented Sep 24 '20, 11:27 a.m.

Hi @Dani ,

Thanks for quick response . I am getting 201 created successful .However testscript is not getting linked .  I noticed namespace which you pointed ,i am using ns5 namespace . Any other suggestion would be highly appreciated.

<ns5:testscript href="https://<server>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<id>/testscript/urn:com.ibm.rqm:testscript:1170"/>

Thanks


1
Khajan Pandey commented Sep 24 '20, 12:43 p.m.

Problem is solved with packaging whole xml body with right namespace .


Thank you for pointers . 

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.