It's all about the answers!

Ask a question

change state of testcase inside testsuite


ronaldo james (112) | asked Feb 17 '22, 5:18 a.m.
edited Feb 17 '22, 6:51 a.m. by Ralph Schoon (63.4k33646)
Hello,
I am trying to change the state of testcase in testsuite using restapi here is the xml
<ns2:suiteelement elementindex="1">
            <ns2:testcase href="https://port:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Sandpit+%28Quality+Management/testcase/uniqid" />
            <ns5:owner>
                owner
            </ns5:owner>
            <ns5:state>
                Under Review
            </ns5:state>      
      </ns2:suiteelement>

but the state is not changing

2 answers



permanent link
David Honey (1.8k17) | answered Feb 17 '22, 6:10 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Insufficient information has been provided to answer your question. Your example doesn't look like valid RDF, and you don't say what the request URI is, so nobodfy can tell what specific REST service you are trying to use.

The main ELM landing page can be found at https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding
That page includes links to ETM APIs.I suggest you read those first and try the documented approaches to updating test cases.

You typically pefform a GET with an Accept header with an RDF media type such as application/rdf+xml , or text/turtle , then update the RDF model, and perform a PUT with that revised RDF, and an If-match with the etag of the resource.

If you're still having issues, please describe the exact HTTP request you're making, including URIs, headers, parameters, and request body, and what HTTP response you get back, including headers.

Comments
Ralph Schoon commented Feb 17 '22, 6:50 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Racing condition David, thanks for your efforts. 


permanent link
Ralph Schoon (63.4k33646) | answered Feb 17 '22, 6:49 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 Sorry, this is nothing. If you do not provide the call URI and the headers, this is not a question. The tagging also hints that you do not care for how this forum works. You are supported to select one product. If you do not care, don't hope for answers.


In the OSLC API of EWM you can not set a state, you have to use an action. I am nit sure if that is relevant or not See https://rsjazz.wordpress.com/2022/02/02/ewm-work-item-oslc-cm-api/


Comments
ronaldo james commented Feb 18 '22, 12:01 a.m.
Hi,
thank you, for the response .
The question is i am not able to change the state of testcase while linking to testsuite but i can able to change owner but state is not working
I have also provided resourse in state tag but id didnt work
xml is given above 
        
the URl is
java  -jar -Dcom.ibm.team.repository.transport.client.protocol="TLSv1.2" "/home/Desktop/python/rqmimporter/RQMUrlUtility.jar" -filepath "/home/Desktop/python/rqmimporter/xmlfiles/post.xml" -command PUT -user user -password password -url https://comp.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Sandpit+%28Quality+Management%29/testsuite/urn:com.ibm.rqm:testsuite:3

Ralph Schoon commented Feb 18 '22, 2:40 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You refer to the Reportable REST API: https://jazz.net/wiki/bin/view/Main/RqmApi

I do not know the RQM Reportable REST API.  It may or may not support setting a state. In the EWM OSLC API you have to use a workflow action instead. 


David Honey commented Feb 18 '22, 4:18 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The Reportable REST API is for reporting. It cannot be used for making data modifications. If you are trying to use that API to update a test case, then you are using the wrong API.


Ralph Schoon commented Feb 18 '22, 4:59 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

David, I am not so sure about that. The ETM Reportable REST API   https://jazz.net/wiki/bin/view/Main/RqmApi seems to be a misnomer and there are capabilities to POST and PUT some stuff.


Michael Rowe commented Oct 19 '23, 2:33 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR

Ralph is right, The ETM "Reportable REST API" is a misnomer, it should be called ETM RestAPI as it does support full CURD on many artifacts. 

Your answer


Register or 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.