It's all about the answers!

Ask a question

Latest Execution Result in RPE


Dylan Mansour (21818) | asked Dec 05 '16, 11:17 a.m.
edited Dec 05 '16, 1:46 p.m.
 I am trying to pull our test case's latest execution result.  Currently it is pulling every single result.  When I use JavaScript, it parses the word and only prints the last character for every single execution result.

Suggestions?

Comments
Ralph Schoon commented Dec 05 '16, 11:29 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Accepted answer


permanent link
Subramanya Prasad Pilar (4.6k16) | answered Dec 06 '16, 2:31 a.m.
edited Dec 06 '16, 4:12 a.m.
You can do it without using any scripting. Sort on executionresult/endtime in Ascending direction and assign the result to a variable. After the iteration, the variable holds the latest result and you can just print the variable.

Another option is to use an internal variable _isPrinted (with default value 0). Sort on endtime (Descending) and print the result only when _isPrinted="0" as in the screenshot.

Dylan Mansour selected this answer as the correct answer

Comments
Dylan Mansour commented Dec 08 '16, 4:36 p.m.

 What condition do you have on the container? 


Subramanya Prasad Pilar commented Dec 09 '16, 1:00 a.m. | edited Dec 09 '16, 1:05 a.m.

Use _isPrinted == "0" condition on Container to print only 1 result. You can use similar logic to print last n results as well by incrementing _isPrinted in JavaScript code.

Your answer


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