Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

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 .

0 votes


Accepted answer

Permanent link

 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

0 votes

Comments

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

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


Thank you for pointers . 

1 vote

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,952
× 29

Question asked: Sep 23 '20, 11:45 p.m.

Question was seen: 1,286 times

Last updated: Sep 24 '20, 12:43 p.m.

Confirmation Cancel Confirm