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"?>
<testcase xmlns="http://jazz.net/xmlns/alm/qm/v0.1/" xmlns:ns10="http://jazz.net/xmlns/alm/qm/v0.1/executionworkitem/v0.1" xmlns:ns11="http://jazz.net/xmlns/alm/qm/qmadapter/task/v0.1" xmlns:ns12="http://jazz.net/xmlns/alm/qm/qmadapter/v0.1" xmlns:ns2="http://schema.ibm.com/vega/2008/" xmlns:ns3="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ns4="http://purl.org/dc/elements/1.1/" xmlns:ns5="http://jazz.net/xmlns/alm/v0.1/" xmlns:ns6="http://jazz.net/xmlns/alm/qm/v0.1/testscript/v0.1/" xmlns:ns7="http://jazz.net/xmlns/alm/qm/v0.1/executionresult/v0.1" xmlns:ns8="http://jazz.net/xmlns/alm/qm/v0.1/tsl/v0.1/" xmlns:ns9="http://jazz.net/xmlns/alm/qm/v0.1/catalog/v0.1">
<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
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
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