IBM Quality Manager provides an API for accessing the history of individual resources as well as the history of archived/deleted resources. You can read about the supported resources types and more on https://jazz.net/wiki/bin/view/Main/RqmApi#historyUrl
In the last week it so happened that I spent a lot of time working with RQM. I’ve created a number of templates in the process and I want to share the most interesting three here.
The templates were created and tested using CLM 5.0.2 and are available on the RPE Developer Works Wiki here.
How to print basic test plan information
Prints basic information about the test plan and its test cases. The test cases are retrieved using the efficient QM native filtering which allows RPE to gets all the test cases associated with the test plan in a single request.
Note that the test plan data source has metadata information that allows the end user to select the test plan from a list rather than typing it.
How do dynamically get state labels for test plans, test cases etc
Prints the test plans and for each their state. The state labels are read from RQM instead of being inferred from the state identifier.
How to print the requirements from a requirement collection associated with a test plan
Prints basic information about a test plan and its linked requirements. The requirements are read from from the requirements collection associated with the testplan.
Continuing the series of articles on the topic of creating traceability documents I have arrived at an interesting use case: traceability from DOORS 9 and RQM.
In this article I will describe how to create a document with requirements from DOORS 9 and their associated test cases from RQM.
Continuing the series of articles on producing traceability documents from IBM CLM I will describe today how to follow links from RQM.
If you examine the RQM schema for testcase for example you will notice entries for workitems and requirements.
With these properties it should be fairly straightforward to build a template that retrieves CM and RM data associated with the QM artefacts.
However if you run your report on a test case feed URL like https://giediprime:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE Banking (Quality Management)/testcase?abbreviate=false there is no requirement or work item data in the document. And if you examine the XML returned by RQM for this request you will see that information is not present there either.
So what is the problem? The answer is in the Rational Quality Manager Reportable REST API Documentation. For efficiency reasons RQM does not return the link information by default. If you want to create traceability documents you’ll have to explicitly ask for the link information using the calmlinks argument in the request URL.
Which means that the right URL to use in the RPE docspec will look like this https://giediprime:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE Banking (Quality Management)/testcase?abbreviate=false&calmlinks=true
Note that the URLs to RTC and DNG are OSLC links and you will need to convert them to Reportable REST API URLs before fetching RM and CCM data.
Examples showing how to follow links from individual testcase or from a test case feed are available in the RPE DevWorks – Cross Domains Templates Wiki.
Continuing the Assemble traceability documents from reusable building blocks I want now to add QM data in the mix. I will be using the same DM model as a starting point and I will follow links to QM Test Cases.
As you read this I recommend also going through Geoff Rosenthal’s the excellent Rational solution for Collaborative Lifecycle Management Traceability Templates with Rational Publishing Engine tutorial.
The artefacts for this tutorial are available on the Unclassified & Cross Domain Templates section of the RPE Wiki Community at #15 DM to CLM Traceability.
Getting the DM link information is already covered in Assemble traceability documents from reusable building blocks so I will skip it here. This article starts from the point where you have your DM and DM link data in place in your template.
How QM linking works
But before I go there I want to explain how QM linking works and what are the various schemas you will encounter in the process.
QM, just like all the other CLM products has an OSLC API that is used for linking. A QM Test Case will be referenced from another product using a URL that looks like this:
For the example I am presenting you can get these URLs from the link page of the DM artifact. And if you access these URLs from a tool like Poster and specify “application/xml” for the “accept” header you can see the data available. One thing you will notice is that even though the data is not in the form you are used to when reporting on QM with RPE which is the QM’s Reportable REST API.
So to get from the OSLC URL to the Reportable REST URL you firsy need to access the OSLC resource, read the Reportable REST URL and then accesses the data there.
How QM linking works – TL;DR version
When you want to access linked QM data you need to:
- access the OSLC representation of the artifact
- you need to use RPE’s Reportate REST v2 schema discovery to find the schema form QM’s OSLC representation. The starting point for the schema discovery process is https://server:port/qm/oslc_qm/catalog
- read the URL to the Reportable REST representation of the QM artefact
- access the Reportable representation of the artefact
- you need to add the QM schema which is available at https://%5Bhost%5D:%5Bport%5D/qm/service/com.ibm.rqm.integration.service.IIntegrationService/schema/qm.xsd
- Use the data as needed
Get linked QM Data from DM
- Insert the QM_TC_Snippet.dta in the indicated position
- Edit the condition on the QM Container such that you are only processing QM Data. I have used the “link type” property to only accept “Validated By” links
- Connect the QM snippet to your template by specifying
- Make a test run to verify all the pieces fit together. Just like with the RTC example you only need to specify the entry point and credentials for accessing the DM UML project.
NOTE: You will need to replace the QM schema from my snippet with your particular QM schema so that you can use the custom attributes defined in your particular QM instance.
You now have 2 RPE snippets for accessing RTC and QM linked data that you can reuse in your traceability documents. I recommend evaluating your existing templates to identify other sections in your templates that you use on a regular basis and transform them in reusable snippets.