It's all about the answers!

Ask a question

RQM OSLC - Update Test Cases


Aaron Cabrera (451418) | asked Sep 30 '14, 5:03 p.m.
We are using version 4.0.5 of CLM (RTC, RRC, RQM)

Is it possible to update an RQM Test Case using OSLC for RQM?  As a test, I want to update the title of a test case.  
During a POST- no error is received and an update does not occur.

Is it like a Test Script: https://jazz.net/wiki/bin/view/Main/RqmOslcQmV2Api#Update_test_script_step - it states "Changes on other properties will not lead to error but have no effect on the resource."

If it is possible, can someone point me to an example?



4 answers



permanent link
Rosa Naranjo (2.9k11723) | answered Sep 30 '14, 7:42 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

Comments
Aaron Cabrera commented Oct 01 '14, 11:07 a.m.

Hi Rosa,

Thank you for your response!

I have read both resources and I believe I'm doing it correctly.  I'm experiencing "Changes on other properties will not lead to error but have no effect on the resource."  that was stated in my previous post.  No errors but no update.

I able to update artifacts in RRC and RTC and I'm currently working on attempting to do it in RQM.



permanent link
Stephane Leroy (1.4k149) | answered Oct 01 '14, 11:22 a.m.
JAZZ DEVELOPER
Hi Aaron,

you mentioned a POST operation while the link you point us to suggests using a HTTP PUT. I suggest you try this 1st ?
If still in error, you would need to provide more information (RQM version, URL, header, etc.)
Hope this helps

Regards,
Stéphane

Comments
Aaron Cabrera commented Oct 01 '14, 2:04 p.m.

I will post additional information below. 


permanent link
Aaron Cabrera (451418) | answered Oct 01 '14, 3:49 p.m.
edited Oct 01 '14, 4:03 p.m.
 I am using a "PUT" in my program - sorry for the confusion.

Contrary to my previous post - I am receiving a HTTP Response (see below) -  'x-com-ibm-team-repository-web-auth-msg': 'authrequired', 'status': '302'

Version
We are using version 4.0.5 of CLM (RTC, RRC, RQM)

Program Steps
Query for QM Resource : 18654
Test Case Query URI: https://<rqm server>/jazz/oslc_qm/contexts/_QQXu4vxPEeKABcdv99EP2g/resources/com.ibm.rqm.planning.VersionedTestCase?oslc.properties=dcterms:title&oslc.where=oslc:shortId=18654

Using XPATH to retrieve the Test Case from the Query Result
Test Case URI: https://<rqm server>/jazz/oslc_qm/contexts/_QQXu4vxPEeKABcdv99EP2g/resources/com.ibm.rqm.planning.VersionedTestCase/_inMDRPxREeKABcdv99EP2g

Build the TEST CASE URI to "PUT"/Update the Test Case - Test Case URI with Properties
queryURI: https://<rqm server>/jazz/oslc_qm/contexts/_QQXu4vxPEeKABcdv99EP2g/resources/com.ibm.rqm.planning.VersionedTestCase/_inMDRPxREeKABcdv99EP2g?oslc.properties=dcterms:title

Build the Header
qm_header {'Content-Type': 'application/rdf+xml', 'OSLC-Core-Version': '2.0', 'Accept': 'application/xml'}

Build the XML (Change Request) to use in the body of the "PUT"
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:calm="http://jazz.net/xmlns/prod/jazz/calm/1.0/" xmlns:rqm_auto="http://jazz.net/ns/auto/rqm#" xmlns:rqm_qm="http://jazz.net/ns/qm/rqm#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:acp="http://jazz.net/ns/acp#" xmlns:oslc="http://open-services.net/ns/core#" xmlns:oslc_auto="http://open-services.net/ns/auto#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:oslc_qm="http://open-services.net/ns/qm#" xmlns:bp="http://open-services.net/ns/basicProfile#"><oslc_qm:TestCase rdf:about="https://rqm01.aide.oit.va.gov:443/jazz/oslc_qm/contexts/_QQXu4vxPEeKABcdv99EP2g/resources/com.ibm.rqm.planning.VersionedTestCase/_inMDRPxREeKABcdv99EP2g"><dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Donation amount limits: Updated - Last @ 2014-10-01T12:13:31.696000</dcterms:title></oslc_qm:TestCase</rdf:RDF>
** The formatting of the XML changes whenever I save it. I've added an image below - you will have to zoom in to see the details.  
RQM RDF

HTTP Request
jazzConsumer.http.request(uri=queryURI, method='PUT', headers=qm_header, body=changeRequest)

HTTP Response
{'x-com-ibm-team-repository-web-auth-msg': 'authrequired', 'status': '302', 'content-length': '0', 'content-language': 'en-US', 'x-powered-by': 'Servlet/3.0', 'location': 'https://<rqm server>/jazz/authenticated/identity?redirectPath=%2Fjazz%2Foslc_qm%2Fcontexts%2F_QQXu4vxPEeKABcdv99EP2g%2Fresources%2Fcom.ibm.rqm.planning.VersionedTestCase%2F_inMDRPxREeKABcdv99EP2g', 'date': 'Wed, 01 Oct 2014 15:56:03 GMT', 'content-type': 'text/plain'}

Project Area (JKE Banking)
Process Roles : Test Team Member
Member of the Administrators

permanent link
Stephane Leroy (1.4k149) | answered Oct 02 '14, 5:15 a.m.
JAZZ DEVELOPER
Hi Aaron,

HTTP error 302 means that you probably get redirected to the RQM login page. Did you try relogin into the RQM server ? Does this resolve the problem ?

Stéphane


Comments
Aaron Cabrera commented Oct 14 '14, 2:13 p.m.

Should there be more to the header when doing a "PUT"?


Header {'Content-Type': 'application/rdf+xml', 'OSLC-Core-Version': '2.0', 'Accept': 'application/xml'} 

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.