RQMUrlutility - Create a new executionworkitem
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
11 answers
If you are not receiving a 303 response code, what is the error?
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>
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
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.
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,
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?
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,
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.