It's all about the answers!

Ask a question

Populate the 'iteration' field of a TER through the API


Matthew Vermilion (1468) | asked Jul 09 '13, 5:13 p.m.
I am attempting to populate the 'iteration' field of a TER through the API.  Can someone tell me how this would be done?

I am assuming that I use the 'testphase' element, but don't know how to look up the href for a specific testphase.  What are the inputs to drill down on a specific testphase href?

Can you provide me some direction?  I have experimented a while with the RQMUrlUtility to prototype some solution, but I seem to be spinning on it.

In the end I need a way for the user to provide my program readable input to populate the TER iteration field though the API.

Thanks for your help.
Matt

2 answers



permanent link
Hao Wan (1.5k35) | answered Jul 15 '13, 1:35 a.m.
JAZZ DEVELOPER
edited Jul 15 '13, 1:37 a.m.
 Hi Matthew,
you can refer to the https://jazz.net/wiki/bin/view/Main/RqmApi
and do a GET request to the specific TER and the testphase url would contain in <testphase> section of the returned xml content such as



Comments
Matthew Vermilion commented Jul 15 '13, 9:34 a.m.

Hao Wan,

With respect, this answer only distantly relates to my question...  :)  I have spent hours with the RQM API wiki and am familiar with the cheat-sheet.

What I needed is the process by which I can populate a TER testphase given the human readable title.  I don't know how to look up the testphase href based on the title.  It's possible that there are other keys that are required for this drill down - I need your direction here.

Can you help?

Thanks.
Matt


Hao Wan commented Jul 15 '13, 10:32 p.m.
JAZZ DEVELOPER

Hi Mat,

sorry for the misunderstanding, based on your last comment, I'm a little confused about your problem.
do you mean you want to get the testphase through REST API? if so my answer would resolve your problem.
if not, my guess is that you want to get the testphase url according to the name of the testphase? but my understanding is that if you are using RQM REST API why not get the url directly through the content of the TER?
my further guessing is that you want to get the url through the web ui, but web ui only contains the title, if you testphase is under one testplan and you could find testplan info in TER web ui and go to testplan then you can find the related testphase.
by the way, testphase defined could be found in https://bxv1v603.cn.ibm.com:9443/qm/admin#action=com.ibm.team.process.editProjectArea&itemId=_IbtcIOk9EeKmmPqwISE6Ag
and the "Timelines" section


Matthew Vermilion commented Jul 16 '13, 8:40 a.m.

Hao Wan,

My process requires human input of testphase title.  Example "Iteration1".

My process will then use the RQM API to create a TER.

My process does not know how to publish the test phase to the TER given the title.

I hope this is clearer.

Thanks.
Matt


permanent link
Paul Slauenwhite (8.3k12) | answered Jul 26 '13, 6:22 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
edited Jul 26 '13, 6:23 a.m.
Hi Matt,

Here are the steps you need to following:

1) Get the specific test phase identifier (URL):

GET https://<host>:<port>/<context root>/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project area alias>/testphase/?fields=feed/entry/content/testphase[title='<test phase title>']/identifier

2) Create the TCER with

POST https://<host>:<port>/<context root>/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project area alias>/executionworkitem

-or-

PUT https://<host>:<port>/<context root>/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project area alias>/executionworkitem/<external ID>

Content:

 <ns2:executionworkitem xmlns:ns2="http://jazz.net/xmlns/alm/qm/v0.1/" xmlns:ns1="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/prod/jazz/process/0.6/" xmlns:ns6="http://jazz.net/xmlns/alm/v0.1/" xmlns:ns7="http://purl.org/dc/terms/" xmlns:ns8="http://jazz.net/xmlns/alm/qm/v0.1/tsl/v0.1/" xmlns:ns9="http://jazz.net/xmlns/alm/qm/v0.1/testscript/v0.1/" xmlns:ns10="http://jazz.net/xmlns/alm/qm/qmadapter/task/v0.1" xmlns:ns11="http://jazz.net/xmlns/alm/qm/qmadapter/v0.1" xmlns:ns12="http://jazz.net/xmlns/alm/qm/v0.1/executionworkitem/v0.1" xmlns:ns13="http://jazz.net/xmlns/alm/qm/v0.1/executionresult/v0.1" xmlns:ns14="http://jazz.net/xmlns/alm/qm/v0.1/catalog/v0.1" xmlns:ns16="http://jazz.net/xmlns/alm/qm/styleinfo/v0.1/" xmlns:ns17="http://www.w3.org/1999/XSL/Transform">
...
        <ns2:testphase href="test phase identifier property"/>
...
</ns2:executionworkitem>

Your answer


Register or to post your answer.