Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Pulling the status of a Test Case

 Is there a way to pull the status (passed, failed, passed with exception) from RQM using RPE?

I have tried testcase/state and that does not seem to work.

0 votes


Accepted answer

Permanent link
testcase/state (_value) will provide the state, which you can edit with a Script Expression as follows:
if(_value == "com.ibm.rqm.planning.common.new"){
'Draft';
}else if(_value == "com.ibm.rqm.planning.common.underreview"){
'Under Review';
}else if(_value == "com.ibm.rqm.planning.common.approved"){
'Approved';
}else if(_value == "com.ibm.rqm.planning.common.retired"){
'Retired';
}else {
_value;
}

I presume you are using testcase feed URL (https://server:port/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<ProjectArea>/testcase?abbreviate=false), which does not return status. You should use the URL of the individual test case that the Atom feed publishes (https://server:port/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<ProjectArea>/testcase/urn:com.ibm.rqm:testcase:<id>). In RPE template, you should (also) have qm schema added.

If you want to print execution result/status (Failed, Passed, Inconclusive, etc.), you should use executionresult/state/_value.
var mystate = _value;
mystate = mystate.replace("com.ibm.rqm.execution.common.state.","");
mystate = mystate.substr(0, 1).toUpperCase() + mystate.substr(1);
mystate;

Please let us know if you need a sample template.
Dylan Mansour selected this answer as the correct answer

0 votes

Comments

 Thank you, that worked!

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 332

Question asked: Aug 11 '16, 4:06 p.m.

Question was seen: 1,206 times

Last updated: Feb 04 '17, 5:29 p.m.

Confirmation Cancel Confirm