RPE - RQM
IBM.com Jazz.net Documentation RQM API developerWorks Getting Started

Contents:

  1. Schema and Data Sources
  2. Comprehensive Test Plan
  3. RQM Structure
  4. Javascript Examples for RQM
Schema
https://business.vanlint5.nl:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/schema/qm.xsd
https://business.vanlint5.nl:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/schema/feed.xsd

Example DataSouces:

https://business.vanlint5.nl:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project>/testplan

Comprehensive Test Plan Template

Article is now published at: Whole Jazz article and template

A page from a document generated with the Comprehensive Test Plan Template.

All information is at: RPE page

RQM Structure (REST Interface)

This chapter shows an example of the expected links when you are working with the REST interface of RQM. You can use Poster or plain FireFox to communicate.

The complete URL is the combination of the Integration URL and one of the strings documented here.

https://business.vanlint5.nl:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/PMD_001+%28Quality+Management%29

Code: The integration URL for RQM Rest.

Complemented with the testplan 5, returns the following information:

%INTEGRATION_URL%/testplan/urn:com.ibm.rqm:testplan:5

-> /testcase/urn:com.ibm.rqm:testcase:52
-> /testcase/urn:com.ibm.rqm:testcase:53
-> /testcase/urn:com.ibm.rqm:testcase:54
-> /testcase/urn:com.ibm.rqm:testcase:55

The Test Case 52 points to nothing:

%INTEGRATION_URL%/testcase/urn:com.ibm.rqm:testcase:52
-> No usefull pointers

The execution result 81 contains a passed result.

%INTEGRATION_URL%/executionresult/urn:com.ibm.rqm:executionresult:81
com.ibm.rqm.execution.common.state.passed
-> /testplan/urn:com.ibm.rqm:testplan:5
-> /testcase/urn:com.ibm.rqm:testcase:52
-> /executionworkitem/urn:com.ibm.rqm:executionworkitem:68

The execution result 82 contains a failed result.

%INTEGRATION_URL%/executionresult/urn:com.ibm.rqm:executionresult:82
<ns5:state>com.ibm.rqm.execution.common.state.failed</ns5:state>
-> /testplan/urn:com.ibm.rqm:testplan:5
-> /testcase/urn:com.ibm.rqm:testcase:52
-> /executionworkitem/urn:com.ibm.rqm:executionworkitem:68

The execution Work item points to the last result:

%INTEGRATION_URL%/executionworkitem/urn:com.ibm.rqm:executionworkitem:68
-> /testcase/urn:com.ibm.rqm:testcase:52
-> /testplan/urn:com.ibm.rqm:testplan:5
-> /executionresult/urn:com.ibm.rqm:executionresult:82 (current execution result)
-> /executionresult/urn:com.ibm.rqm:executionresult:82

To query on execution work items we can use the following URL

https://business.vanlint5.nl:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/PMD_001+%28Quality+Management%29/executionworkitem?fields=feed/entry/content/executionworkitem/(*|testplan[@href='https://business.vanlint5.nl:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/PMD_001+%28Quality+Management%29/testplan/urn:com.ibm.rqm:testplan:5']|testcase[@href='https://business.vanlint5.nl:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/PMD_001+%28Quality+Management%29/testcase/urn:com.ibm.rqm:testcase:52'])

When used in a RPE assignment/javascript:

singleProjectFeedURL+"/executionworkitem?fields=feed/entry/content/executionworkitem/(*|testplan[@href='"+singleProjectFeedURL+"/testplan/urn:com.ibm.rqm:testplan:"+testPlanID+"']|testcase[@href='"+singleProjectFeedURL+"/testcase/urn:com.ibm.rqm:testcase:"+testCaseID+"'])"

Javascript Samples for RQM

Reformat the state variable to what you see in the GUI.

For the execution:

/*==EXECUTION STATE==*/
var mystate = _value;
mystate = mystate.replace("com.ibm.rqm.execution.common.state.","");
mystate = mystate.substr(0, 1).toUpperCase() + mystate.substr(1);
switch (mystate) {
case ("Passed"):
case ("Failed"):
case ("Inconclusive"):
case ("Blocked"):
case ("Error"):
break
default:
   mystate = "UNKNOWN STATE "+_value
break
}
mystate;

For the planning:

/*==PLANNING STATE==*/
var mystate = _value;
mystate = mystate.replace("com.ibm.rqm.planning.common.","");
mystate = mystate.substr(0, 1).toUpperCase() + mystate.substr(1);
switch (mystate) {
case ("New"):
   mystate = "Draft"
break
case ("Underreview"):
   mystate = "Under Review"
break
case ("Approved"):
case ("Reject"):
break
default:
   mystate = "UNKNOWN STATE "+_value
break
}
mystate;
var mypriority = _value;
mypriority = mypriority.replace("literal.priority.","");
switch (mypriority) {
case ("101"):
   mypriority = "Unassigned";
   break
case ("130"):
   mypriority = "High";
   break
case ("120"):
   mypriority = "Medium";
   break
case ("110"):
   mypriority = "Low";
   break
default:
   mypriority = "UNKNOWN PRIORITY "+_value
break
}
mypriority;

Alternative way of coding (from the RRDG example):

stringMap =
{
	"com.ibm.rqm.planning.common.new": "Draft",
	"com.ibm.rqm.planning.common.underreview": "Under Review",
	"com.ibm.rqm.planning.common.approved": "Approved",
	"com.ibm.rqm.planning.common.retired": "Retired"
};
stringMap[_value];

Change TC Estimate to a HH:MM:SS format.

var nrsec = _value/1000;
var nrhour = parseInt (nrsec/3600);
nrsec=nrsec-nrhour*3600;
var nrmin = parseInt (nrsec/60);
nrsec=nrsec-nrmin*60;
if (nrsec < 10) nrsec="0"+nrsec;
if (nrmin < 10) nrmin="0"+nrmin;
nrhour+":"+nrmin+":"+nrsec

To show the testCaseFeedURL in the console while run is executed. Handy to keep track!

java.lang.System.out.println( ">>>> " + testCaseFeedURL);

To remove % characters from URL

/*
Identifier: .../PMD_001+%28Quality+Management%29/testplan/urn:com.ibm.rqm:testplan:16
testPlanID: .../PMD_001+(Quality+Management)/testplan/urn:com.ibm.rqm:testplan:16
*/
java.lang.System.out.println( ">>>> " + identifier);
var testPlanID = decodeURI(identifier);
java.lang.System.out.println( ">>>> " + testPlanID);

RRDG with RQM

RQM has it's own RPE engine. This is called RRDG.

Integration URL

Every resource is at a certain location, but where? That's challenging! Here some samples:

To get the RQM schema. IntegrationURL:

https://business.vanlint5.nl:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService

Known limitations

The template should be seen as an example and a starting point. It's delivered on as-is basis. There are some limitations know. Some of them are due to choices others have other sources.

  1. If a Test Case has multiple Test Scripts attached it should be visible.