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

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>

1 vote



3 answers

Permanent link
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

1 vote


Permanent link
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 --:
-command POST -user ADMIN -password ADMIN -filepath C:\\RQM_Attachment.jpg
-url https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality%20Manager/attachment/attach_n2

from https://jazz.net/wiki/bin/view/Main/RqmApi#RQM_URL_Utility

1 vote

Comments

thanks! that worked!


Permanent link
Hi Vinod,
414 response means "Unsupported media type"
Not sure why are you seeing this message when actually testcase is being uploaded
RQMUrlUtility: Calling [ HTTP POST ] method to upload ATTACHMENT to Attachment Feed
You can send me email with your xml file and also would like to remove the name of server (IP) in this post

0 votes

Comments

HI Pramod - thanks for your response. am sending the xml file in email, i dont find an option here to attach a file.

also the reponse code am getting is 415, not 414. Thanks!

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
× 12,014
× 18

Question asked: Aug 03 '12, 4:53 p.m.

Question was seen: 5,581 times

Last updated: Aug 16 '12, 4:03 p.m.

Confirmation Cancel Confirm