All, I am attempting to get access to the previous builds test results and can't seem to in the jelly script I'm working with. I've tried numerous different attempts at getting the TestResultAction object from the Run.getAction method however I have been unsuccessful so far and hoped one of you could shed some light on my issue. I've also used the getAllActions method to see that there is indeed a TestResultAction on my previous build. I've even got the TestResultAction successfully when I've used the Run.getAllActions().get(*indexOfTestResultAction*). This has proven successful but not reliable as it is not always in the same sequence build after build.
Here is an example script that I've been working with. If anyone has ideas or clues as to why this isn't working for me please let me know. In the example I have below the testAction1 variable I define is always NULL. Thanks! <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define"> <BODY> <j:set var="previousBuild1" value="${build.getPreviousBuild()}" /> <j:if test="${previousBuild1!=null}"> PREVIOUS BUILD1 IS NOT NULL <j:set var="allActions" value="${previousBuild1.getAllActions()}" /> <j:if test="${allActions!=null}"> ACTIONS IS NOT NULL ${allActions} <j:set var="testAction1" value="${previousBuild1.getActions(hudson.tasks.junit.TestResultAction.class)}" /> <j:if test="${testAction1!=null}"> TEST ACTION1 IS NOT NULL </j:if> <j:if test="${testAction1==null}"> TEST ACTION1 IS NULL </j:if> </j:if> <j:if test="${allActions==null}"> ACTIONS IS NULL </j:if> </j:if> <j:if test="${previousBuild1==null}"> PREVIOUS BUILD1 IS NULL </j:if> -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.