need help creating a testcase in RQM using RESTAPI
![]()
Hi - i am trying to create a testcase using a RESTAPI
i have build the following readtest.xml XML, see below then, ran the command as: java -jar c:\Keydata\Omnifind\ICA\QA\RQM\RQMUrlUtility.jar -command POST -user vreddy@us.ibm.com -password xxxxxxx -filepath c:\Keydata\Omnifind\ICA\QA\RQM\readtest.xml -url https://hostname:9450/jazz/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Discovery/testcase But it fails with following error: RQMUrlUtility: Connected to https://svljazz06.svl.ibm.com:9450 using project "Discovery" Aug 3, 2012 4:47:18 PM org.apache.commons.httpclient.HttpMethodDirector isRedirectNeeded INFO: Redirect requested but followRedirects is disabled RQMUrlUtility: Calling [ HTTP POST ] method to upload ATTACHMENT to Attachment Feed RQMUrlUtility: Server Response code: 415 i cannot from anywhere what the response code 415 means! note: i read through another post similar to this topic but the suggestions from that post did not help. Appreciate your expert help here! <?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"><ns4:title>VINODXXXTEST</ns4:title><ns4:description>VINODXXXTEST</ns4:description><weight>100</weight><category term="Test Type" value="Integration Test"/><variables/><template href="https://svljazz06.svl.ibm.com:9450/jazz/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Discovery/template/testcase/com.ibm.rqm.planning.templates.testcase.template_1294327799046"/></testcase> |
3 answers
![]()
Hi Vinod,
as you are using UrlUtility, you need to change the POST request to PUT and append a testcase id, you can use the following url java -jar c:\Keydata\Omnifind\ICA\QA\RQM\RQMUrlUtility.jar -command PUT -user vreddy@us.ibm.com -password xxxxxxx -filepath c:\Keydata\Omnifind\ICA\QA\RQM\readtest.xml -url https://hostname:9450/jazz/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Discovery/testcase/a1 because for UrlUtility, POST is only for attachment artifact please refer to Artifact upload --: -command PUT -user ADMIN -password ADMIN -filepath C:\\RQMUrlUtility_PUT.txt -url https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality%20Manager/testsuite/tsuite_n1
Attachment upload --:
|
![]()
what's more if you want to use POST request to create testcase, you can use poster https://jazz.net/wiki/bin/view/Main/RQMUsingPoster
|
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.
Comments
the XML seems distorted, so trying to post again
<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"><ns4:title>VINODXXXTEST</ns4:title><ns4:description>VINODXXXTEST</ns4:description><template href="https://svljazz06.svl.ibm.com:9450/jazz/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Discovery/template/testcase/com.ibm.rqm.planning.templates.testcase.template_1294327799046"/></testcase>