How to create RQM testcases using REST api?
I am doing a PUT request on below url :
with string in body as
<?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: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>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project-id>/testcase</id>
<ns4:title>RQM Test Case</ns4:title>
<ns4:category value="Unit Test" term="Test Phase"/>
<ns4:description>Hi, by using RQM Rest API</ns4:description>
<ns5:state>com.ibm.rqm.planning.common.new</ns5:state>
</testcase>
It gives me 400 with error message "Cannot create or update a resource of type testcase with a missing ID". Please suggest what is right PUT/POST with body .
Thank you .
|
Accepted answer
Hi Khajan,
For access/create test artifacts in RQM through OSLC or REST APIs -
Please refer to : https://sleroyblog.wordpress.com/2013/04/09/querying-rqm-40-through-oslc-and-rest-api/
Thanks & Regards,
Karthik
Khajan Pandey selected this answer as the correct answer
Comments
Khajan Pandey
commented Sep 14 '20, 9:19 p.m.
Hi Karthik,
I appreciate quick response . I was following this thread with all necessary headers such as JSESSIONID . but i get 4xx with PUT and body as xml string . Could you help in body of request .
Thank you .
Khajan Pandey
commented Sep 17 '20, 10:53 a.m.
Finally after changing Content-Type ,i could create TestCase . |
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.