Execution Result of a Test Case
Hello everyone. I am trying to pull the execution result of a test case and seem to be running into a problem.
I am using a test case QM to pull info on the test case. I use a data source configuration on a feed schema to pull execution result data, but it doesn't seem to be pulling the info.
Are there any templates that achieve this goal?
Thank you,
Dylan Mansour
|
Accepted answer
Once you get the testcase URL, you can get executionworkitems filtered by testcase/@href. You may use the following Script Expression to configure new data source (_Execution Work Item Feed) :
var pos=identifier.indexOf(/testcase/); //Using testcase/identifier var configURI=identifier.substring(0,pos); configURI=configURI + "/executionworkitem?fields=feed/entry/content/executionworkitem[testcase/@href='" + identifier + "']/*" configURI You can then dynamically set feed/entry/content/executionworkitem/executionresult/href as the URI for another datasource (_Execution Result Details). executionresult/state/_value will give the execution results. Note that, there can be multiple execution results. You can either print all or print the latest. If no execuition results found, you can print the state as "Not Executed". Dylan Mansour selected this answer as the correct answer
Comments
Dylan Mansour
commented Aug 15 '16, 9:57 a.m.
This is very helpful, thank you. What is the query you use to configure your first data source? Since you already have testase details, you can derive the url (using Data Source Configuration element) for _Execution Work Item Feed using following Script Expression:
Dylan Mansour
commented Aug 15 '16, 4:38 p.m.
I finally have it pulling the url for each and every execution result; my javascript didn't parse it correctly so now I am working on that. Thanks for the help!
Dylan Mansour
commented Aug 17 '16, 10:45 a.m.
What JS would you use to parse this:
com.ibm.rq
m.execution
.common.st
ate.failed
com.ibm.rq
m.execution
.common.st
ate.passed
Subramanya Prasad Pilar
commented Aug 17 '16, 12:25 p.m.
You can use any script expression. for example
|
One other answer
Hi there, i'm dealing with the same problem. I want to get my execution results from a specific test case but when i follow your steps, i can't execute it in RPE Launcher (the execution is aborted). I noticed that you did some intermediates step with affectations beteween your datasource configuration but i van't figure out why. Could you explain why ? Or even better, could you share your RPE template so i can read and understand all your steps ?
|
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.