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

RQMUrlutility - Create a new executionworkitem

We can't create a new executionworkitem through the REST API using RQMUrlutility.

We can succesfully GET a executionworkitem, but using PUT to create a new seems harder then expected.

java -jar RQMUrlUtility.jar -command PUT -user xxxx -password xxxx -filepath c:\rqmurl\ter.xml -url https://xxx/jazz/service/com.i

m.rqm.integration.service.IIntegrationService/resources/project/executionworkitem


The ter.xml file is the same file as the GET but without the tags identification and webId.


Has anyone been succesfull creating new TER? If so, please give me some directions.

/Best Regards, Bengt

0 votes



11 answers

Permanent link
I am assuming you are seeing a 303 (See Other) response code. A TER can only be associated to one test case so if you are PUTting/POSTing a duplicate TER (e.g. same test case), you will get a 303 with the ID of the original TER in the Content Location header of the response.

If you are not receiving a 303 response code, what is the error?

0 votes


Permanent link
Ok, I have tried with a new test case but without any success.

If we start from the beginning.

Is the following syntax?

java -jar RQMUrlUtility.jar -command PUT -user xxxx -password xxxx -filepath c:\rqmurl\ter.xml -url https://xxxx/jazz/service/com.i 

m.rqm.integration.service.IIntegrationService/resources/project/executionworkitem -context jazz


ter.xml (seems as I can't post it correctly):



<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <ns2:executionworkitem xmlns:ns5="http://jazz.net/xmlns/alm/v0.1/" xmlns:ns6="http://jazz.net/xmlns/alm/qm/v0.1/executionworkitem/v0.1" xmlns:ns7="http://jazz.net/xmlns/alm/qm/v0.1/tsl/v0.1/" xmlns:ns8="http://jazz.net/xmlns/alm/qm/v0.1/executionresult/v0.1" xmlns:ns10="http://jazz.net/xmlns/alm/qm/qmadapter/v0.1" xmlns:ns9="http://jazz.net/xmlns/alm/qm/v0.1/testscript/v0.1/" xmlns:ns11="http://jazz.net/xmlns/alm/qm/qmadapter/task/v0.1" xmlns:ns1="http://schema.ibm.com/vega/2008/" xmlns:ns2="http://jazz.net/xmlns/alm/qm/v0.1/" xmlns:ns3="http://jazz.net/xmlns/alm/qm/v0.1/catalog/v0.1" xmlns:ns4="http://purl.org/dc/elements/1.1/">
<ns4:title>external2</ns4:title>
<ns4:description />
<ns4:creator>EBENAUG</ns4:creator>
<ns5:owner>EBENAUG</ns5:owner>
<ns6:frequency>Once</ns6:frequency>
<ns6:regression>false</ns6:regression>
<ns6:priority />
<ns6:weight>100</ns6:weight>
<ns6:tags />
<ns2:testcase href="https://xxxx/jazz/service/com.ibm.rqm.integration.service.IIntegrationService/resources/xxxx/testcase/urn:com.ibm.rqm:testcase:22720" />
</ns2:executionworkitem>

0 votes


Permanent link
Are you using the project area alias (see https://jazz.net/wiki/bin/view/Main/RqmApi#projectAlias) for project in the -url?

0 votes


Permanent link
Are you using the project area alias (see https://jazz.net/wiki/bin/view/Main/RqmApi#projectAlias) for project in the -url?


If the project alias would be wrong, could I really be succesfull using a GET then? GET is working, POST is not.

Right now I get following error message from the utility - RQMUrlUtility: Server Response code: 415

0 votes


Permanent link
Correct.

I believe you are running into https://jazz.net/jazz02/resource/itemName/com.ibm.team.workitem.WorkItem/58732.

0 votes


Permanent link
Correct.

I believe you are running into https://jazz.net/jazz02/resource/itemName/com.ibm.team.workitem.WorkItem/58732.


How can I use the workaround (using PUT) as PUT needs an item ID, which I don't have as the item should be created?

0 votes


Permanent link
The RQM Reportable REST API can create resources using a PUT request with an external ID (see https://jazz.net/wiki/bin/view/Main/RqmApi#External_ID). For example,

PUT https://<RQM>:<RQM>/<RQM>/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<RQM>/executionworkitem/1234

However, TERs (or executionworkitem) are considered equal when they reference the same test case(s). As such, a PUT request with an external ID turns into an update of the existing TER (or executionworkitem) with a different ID.

0 votes


Permanent link
I'm using RQM Reportable REST API to create TER and ER records using http PUT. I can successfully create TER and ER OK for the first time and they are associated to each other as well as to the right test case and test script. However, I cannot create a new TER if my test case already has a TER and got http 303 error.

What do I need to do to trigger a creation of new TER for a particular test case? Is it in the TER xml file?

Here is my cmd:

PUT https://<RQM>:<RQM>/<RQM>/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<RQM>/executionworkitem/ter123.xml

Thanks,

0 votes


Permanent link
You cannot create more than one test execution record per test case, environment, plan, and milestone.

0 votes

Comments

Thanks Paul,

Since a TC will be reused in future releases for regression testing, I would like to be able to create a new TER to represent the results per release/iteration/etc...

I'm using the RQMUrlUtil to try out the REST interface and getting a 303.
I'm trying to link the TER to an existing TC that already has a few TERs associated with it.

I have tried to create it against that TC and a new Test Plan for the new release and I'm still getting a 303.

What then is the recommended way to use this interface to generate a new TER against an existing TC, without having to create a new copy of that TC every time?


Permanent link
You cannot create more than one test execution record per test case, environment, plan, and milestone.


From GUI I can create new TER for a given test case. Will RQM REST API add support for this in the future? Can I query existing TER for a given test case? If so, please let me know how. At least I can add new ER to existing TER of a test case.

Thanks,

0 votes

Comments

You cannot create more than one test execution record per test case, environment, test plan, and milestone/iteration in the RQM Reportable REST API or RQM UI.  You must have changed one/more of these test execution record properties.

Note, the RQM URL Utility does not support query string (e.g. request parameters) and fragment ID.  I would suggest using Poster and/or HttpRequester.

Using
fields selection/filtering, you can query test execution records based on a given test case.

1–15 items
page 1of 1 pagesof 2 pages

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

Question asked: Nov 21 '11, 3:22 a.m.

Question was seen: 10,979 times

Last updated: May 07 '13, 7:44 a.m.

Confirmation Cancel Confirm