RQM 5.0 : Acess all the Custom sections and categories of Test Case in RQM through Java
![]()
I want to access all these sections and categories through java. As per the exploration i have done it is possible through REST API but i am not sure whether i will be able to access all the sections [including categories ] ans or not ?
|
Accepted answer
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Jun 02 '15, 3:32 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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. Naveen Tyagi selected this answer as the correct answer
Comments I have already tried HTTP client(Firefox plugin) and now trying though command line but i am getting few sections Test Case in xml file as output but i want all. |
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 |
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.
Comments
As far as I am aware there is no Java API for RQM. You would have to use the OSLC API. You can use OSLC with Java. See http://www.eclipse.org/lyo/ as an example.
Thanks Ralaph,
Actually want to access all these sections to create xml file using programming in a given format of the third party tool. I have checked with REST API but i don't think iu will be able to access all these sections in xml file and second part is i need to change the format of the xml file as per the third party tool. Can you please provide me any tutorials where i can start REST API through eclipse step by step, since i am new to this REST API stuff so facing to hard time to understand where to start.
Please have a look at https://rsjazz.wordpress.com/interesting-links/ I collected some links in the OSLC section.
I may be wrong but i think REST API can't be use alone through java to access the artifact. It provides kind of interface where we have to pass the URL and can perform CRUD operation to get the output in xml format. For programmatically accessing the artifact we have no option but OSLC. I think, i need to start OSLC exploration for this problem to sort out. Thanks Ralpah for help. : ) :)