RQM 5.0 : Acess all the Custom sections and categories of Test Case in RQM through Java
Accepted answer
It is possible to use REST and use Java as development language. There are multiple ways to do this. This is for example what fundamentally backs the implementation of the RTC Client API.
You basically use a HTTP client for post and retrieve data and then JSON or XML libraries to work with the retrieved data.
If I remember correctly the Open Services for Lifecycle Collaboration Workshop mentions this.
You basically use a HTTP client for post and retrieve data and then JSON or XML libraries to work with the retrieved data.
If I remember correctly the Open Services for Lifecycle Collaboration Workshop mentions this.
One other answer
You can use REST API to GET the section data in test cases.
The examples in https://jazz.net/wiki/bin/view/Main/RqmApi will provide some examples for you to start with.
If you check the resources for TestCases, it shows:
/category
/com.ibm.rqm.defects.web.RmLinks
/com.ibm.rqm.defects.web.RTCWorkItem
/com.ibm.rqm.execution.editor.section.ewis
/com.ibm.rqm.planning.editor.section.attachments
/com.ibm.rqm.planning.editor.section.testCaseDesign
/com.ibm.rqm.planning.editor.section.testcaseExecVars
/com.ibm.rqm.planning.editor.section.testCaseExpectedResults
/com.ibm.rqm.planning.editor.section.testCasePostCondition
/com.ibm.rqm.planning.editor.section.testCasePreCondition
/com.ibm.rqm.planning.editor.section.testCaseScripts
/com.ibm.rqm.planning.editor.section.testCaseSummary
/com.ibm.rqm.process.editor.section.review
/com.ibm.rqm.risk.editor.section.caseAssessment
it means that you can retrieve category and those built-in sections using the Reportable REST API(you can use a REST Client to get the XML file)
For custom sections, if you don't need to use any existing sections, you can rename them for your own use and their id listed above will still apply. If you create a new section, then you need to find out custom section's own id.
For example, I have RQM1 project area and test case:34 has a custom section, if I use REST client, I can
get the XML like:
><dynamicSection_1433228194709 xmlns="http://jazz.net/xmlns/alm/qm/v0.1/" extensionDisplayName="test_section"><div xmlns="http://www.w3.org/1999/xhtml">this is a test section</div></dynamicSection_1433228194709>
So the id is: dynamicSection_1433228194709, from here, if I want to get the XML for testcase 34 with category, pre-condition and this custom section, I can try:
https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/RQM1/testcase?fields=feed/entry/content/testcase[title='testcase3']/(category|com.ibm.rqm.planning.editor.section.testCasePreCondition|dynamicSection_1433228194709)
(testcase3 is the title of test case 34)
if you have many testcases which have the common sections you want to get, you may try something like:
https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/RQM1/testcase?fields=feed/entry/content/testcase/(category|com.ibm.rqm.planning.editor.section.testCasePreCondition|dynamicSection_1433228194709)
I hope this helps to some degrees. Thanks
The examples in https://jazz.net/wiki/bin/view/Main/RqmApi will provide some examples for you to start with.
If you check the resources for TestCases, it shows:
/category
/com.ibm.rqm.defects.web.RmLinks
/com.ibm.rqm.defects.web.RTCWorkItem
/com.ibm.rqm.execution.editor.section.ewis
/com.ibm.rqm.planning.editor.section.attachments
/com.ibm.rqm.planning.editor.section.testCaseDesign
/com.ibm.rqm.planning.editor.section.testcaseExecVars
/com.ibm.rqm.planning.editor.section.testCaseExpectedResults
/com.ibm.rqm.planning.editor.section.testCasePostCondition
/com.ibm.rqm.planning.editor.section.testCasePreCondition
/com.ibm.rqm.planning.editor.section.testCaseScripts
/com.ibm.rqm.planning.editor.section.testCaseSummary
/com.ibm.rqm.process.editor.section.review
/com.ibm.rqm.risk.editor.section.caseAssessment
it means that you can retrieve category and those built-in sections using the Reportable REST API(you can use a REST Client to get the XML file)
For custom sections, if you don't need to use any existing sections, you can rename them for your own use and their id listed above will still apply. If you create a new section, then you need to find out custom section's own id.
For example, I have RQM1 project area and test case:34 has a custom section, if I use REST client, I can
get the XML like:
><dynamicSection_1433228194709 xmlns="http://jazz.net/xmlns/alm/qm/v0.1/" extensionDisplayName="test_section"><div xmlns="http://www.w3.org/1999/xhtml">this is a test section</div></dynamicSection_1433228194709>
So the id is: dynamicSection_1433228194709, from here, if I want to get the XML for testcase 34 with category, pre-condition and this custom section, I can try:
https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/RQM1/testcase?fields=feed/entry/content/testcase[title='testcase3']/(category|com.ibm.rqm.planning.editor.section.testCasePreCondition|dynamicSection_1433228194709)
(testcase3 is the title of test case 34)
if you have many testcases which have the common sections you want to get, you may try something like:
https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/RQM1/testcase?fields=feed/entry/content/testcase/(category|com.ibm.rqm.planning.editor.section.testCasePreCondition|dynamicSection_1433228194709)
I hope this helps to some degrees. Thanks
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jun 02 '15, 2:33 a.m.1 vote
Naveen Tyagi
Jun 02 '15, 2:43 a.m.Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jun 02 '15, 2:48 a.m.1 vote
Naveen Tyagi
Jun 02 '15, 3:24 a.m.