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

How to update rqm testcaseresults with REST-Api?

 Hi,

I have a testsuite that executes my script that reads a csv file with testcasenames and their new state(failed, blocked, passed) and i want to update all of the testcases from the testsuite with a PUT call.
What i need:
  • The url to update a testcaseresult
  • The headers of the PUT call

Thanks in advance,

Emil Cavani

0 votes



One answer

Permanent link

Hi Em


Please see the RQM Reportable REST API WIKI (https://jazz.net/wiki/bin/view/Main/RqmApi):

0 votes

Comments

ok thanks, but can you tell me how i put authorization credentials into the header?

Hi Emil,


I would suggest looking at (or using) the source code from one of applications (see https://jazz.net/wiki/bin/view/Main/RqmApi#Code_Examples).

I studied your suggested page and tried to get the ressourcexml.

My url: 
https:/{host}/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Test QM/testcase/urn:com.ibm.rqm:testcase:76?abbreviate=false 
with Accept header with value: application/xml

But the response is no xml, but the rqmwebpage of the testcase.

So please tell me how to retrieve the resourcexml of a testcase, or something like that.

Ok the good thing is, that i figured out, that you can´t get xml representations of testcases. The bad thing is when i tried to get the xml of my executionresult it worked, but i want to update the state of it, so i made a put request with the same url and added the header IsMatch. I assigned the value of the header with the state id of the xml (_3OPykpmAEeiWE6r_3f0nZA). But the response is error 412 precondition failed and the body contains the answer to the error: State identifier _3OPykpmAEeiWE6r_3f0nZA is stale.  But what does this mean and what id should i take instead?

Apologies for the delayed response.


Yes, you can GET the XML representation of test cases.  In your case, there may be an authentication issue, rerouting your GET request to the web UI login page.  What HTTP client are you using?  I would suggest using one of the HTTP clients listed at https://jazz.net/wiki/bin/view/Main/RqmApi#Common_Usage_Scenarios.

For your PUT (update) request, it appears that there was any update to the test case result after your GET response and before you PUT request.  In this case, retry the steps (GET, update, PUT) again.
 

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
× 10,941
× 478
× 218
× 45
× 16

Question asked: Aug 07 '18, 5:03 a.m.

Question was seen: 4,444 times

Last updated: Sep 06 '18, 7:48 a.m.

Confirmation Cancel Confirm