[closed] How to update/modify multiple test cases in RQM using REST/OSLC?
The question has been closed for the following reason: "The question is answered, right answer was accepted" by davidhoney Jun 26 '23, 4:05 a.m.
Accepted answer
Hi Andrew,
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<entry>
<id>resource ID</id>
<content>
resource XML
</content>
</entry>
</feed>
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<entry>
<id>https://<server_url>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project_name>/testcase/urn:com.ibm.rqm:testcase:2</id>
<content>
<ns19:testcase
xmlns:ns19="http://jazz.net/xmlns/alm/qm/v0.1/"
xmlns:ns3="http://purl.org/dc/elements/1.1/"
xmlns:ns21="http://www.w3.org/1999/XSL/Transform">
<ns3:title type="text">Test updated</ns3:title>
<ns19:weight>500</ns19:weight>
</ns19:testcase>
</content>
</entry>
<entry>
<id>https://<server_url>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project_name>/testcase/urn:com.ibm.rqm:testcase:20</id>
<content>
<ns19:testcase
xmlns:ns19="http://jazz.net/xmlns/alm/qm/v0.1/"
xmlns:ns2="http://schema.ibm.com/vega/2008/"
xmlns:ns3="http://purl.org/dc/elements/1.1/"
xmlns:ns21="http://www.w3.org/1999/XSL/Transform">
<ns3:title type="text">Test updated 1</ns3:title>
<ns19:weight>1000</ns19:weight>
</ns19:testcase>
</content>
</entry>
</feed>
Comments
@Monika thanks now the HTTP POST method work correctly but it creates new test cases. My requirement is update test cases in bulk. Is it possible using qm REST API?
@Andrew, Please update the ID of each test case to the ID with your existing test case which you would like to update under <id> tag.
and where i should update this <id> field in my xml or url?
2 other answers
Hi user PUT method with URL: https://<serverUrl>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE%20Banking%20(Quality%20Management)/testcase/
Hi Andrew,
Comments
Hi @Monika Rajput thanks for your reply when I changed my method to POST, now http response returning 400 code, with PUT it was 302
@Monika Rajput responcebody returns message "No feed entries in the bulk upload request" . could you please help me to understand the meaning m url is:
Comments
Binoy Udayan
Jun 26 '23, 4:03 a.m.I'm writing here as I couldn't comment.
I'm facing a similar issue. I'm trying to update existing test cases, but POST request is creating new test cases instead of updating test cases.
All of them created new test cases.
When I tried PUT, getting 400 error resonse with error message 'javax.xml.bind.UnmarshalException: unexpected element (uri:"http://www.w3.org/2005/Atom", local:"feed")'
David Honey
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jun 26 '23, 5:01 a.m.