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

POST of a test suite result doesn't return any content

 Hi,

I'm trying to use a GET of a test suite result as a template to create new ones by POSTing the template with different values. what I need as a result is the information of the new test result created but I get nothing.
I tried the same with test case result and I got as a result the basic information: ID, url to new result etc:

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:rqm="http://schema.ibm.com/rqm/2007#executionresult">

            <rqm:resultId xmlns:rqm="http://schema.ibm.com/rqm/2007#executionresult">14356</rqm:resultId>

            <rqm:resultItemId xmlns:rqm="http://schema.ibm.com/rqm/2007#executionresult">_FLdpoyUIEeempt5qUMUPeA</rqm:resultItemId>

            <rqm:resultExternalId xmlns:rqm="http://schema.ibm.com/rqm/2007#executionresult">slug__FKbH0CUIEeempt5qUMUPeA</rqm:resultExternalId>

</entry>


can someone let me know how to get get the same information when creating a new test suite result?

 

<style> &amp;lt;!-- / Font Definitions / @font-face {font-family:&amp;quot;Cambria Math&amp;quot;; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:&amp;quot;Segoe UI&amp;quot;; panose-1:2 11 5 2 4 2 4 2 2 3;} / Style Definitions / p.MsoNormal, li.MsoNormal, div.MsoNormal {margin-top:0cm; margin-right:0cm; margin-bottom:8.0pt; margin-left:0cm; line-height:107%; font-size:11.0pt; font-family:&amp;quot;Calibri&amp;quot;,sans-serif;} .MsoChpDefault {font-family:&amp;quot;Calibri&amp;quot;,sans-serif;} .MsoPapDefault {margin-bottom:8.0pt; line-height:107%;} / Page Definitions / @page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt;} div.WordSection1 {page:WordSection1;} --&amp;gt; </style>

0 votes


Accepted answer

Permanent link

What you described is not the expected behavior. In other words, you should not rely on the response body to find out the newly created resource, which is not in the specification. Instead, you should use the response header to proceed further.

1. If using RQM OSLC API, you would POST to the CreationFactory link. If successful, you should get an HTTP 201 code, and the response header "Location" contains resource URI of the newly created resource. Easy.

2. If using the RQM reportable REST API, you would POST to the https://hostname/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<Project Area>/testsuite/. If successful, you should get an HTTP 201 code, and the response header "Content-Location" contains the ID (also called a slug) of the newly created resource. You can then access it by the link https://hostname/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<Project Area>/testsuite/<Slug>
https://jazz.net/wiki/bin/view/Main/RqmApi#HTTP_PUT_POST_Requests

sara chason selected this answer as the correct answer

0 votes

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
× 6,122

Question asked: Apr 19 '17, 10:05 a.m.

Question was seen: 1,686 times

Last updated: Apr 20 '17, 6:07 a.m.

Confirmation Cancel Confirm