hudson.tasks.junit
Class TestResultAction

java.lang.Object
  extended by hudson.tasks.test.AbstractTestResultAction<TestResultAction>
      extended by hudson.tasks.junit.TestResultAction
All Implemented Interfaces:
Action, HealthReportingAction, ModelObject, org.kohsuke.stapler.StaplerProxy
Direct Known Subclasses:
SurefireReport

public class TestResultAction
extends AbstractTestResultAction<TestResultAction>
implements org.kohsuke.stapler.StaplerProxy

Action that displays the JUnit test result.

The actual test reports are isolated by WeakReference so that it doesn't eat up too much memory.

Author:
Kohsuke Kawaguchi

Nested Class Summary
static class TestResultAction.Data
          Resolves TestActions for the given TestObject.
 
Field Summary
 
Fields inherited from class hudson.tasks.test.AbstractTestResultAction
owner
 
Constructor Summary
TestResultAction(AbstractBuild owner, TestResult result, BuildListener listener)
           
 
Method Summary
 List<TestAction> getActions(TestObject object)
           
 int getFailCount()
          Gets the number of failed tests.
 List<CaseResult> getFailedTests()
          A shortcut for summary.jelly
 TestResult getResult()
          Returns the object that represents the actual test result.
 int getSkipCount()
          Gets the number of skipped tests.
 Object getTarget()
           
 int getTotalCount()
          Gets the total number of tests.
 Object readResolve()
           
 void setData(List<TestResultAction.Data> testData)
           
 void setResult(TestResult result, BuildListener listener)
          Overwrites the TestResult by a new data set.
 
Methods inherited from class hudson.tasks.test.AbstractTestResultAction
doGraph, doGraphMap, findCorrespondingResult, findPreviousCorresponding, getApi, getBuildHealth, getDescription, getDisplayName, getFailureDiffString, getIconFileName, getPreviousResult, getTestResultPath, getUrlName, setDescription
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestResultAction

public TestResultAction(AbstractBuild owner,
                        TestResult result,
                        BuildListener listener)
Method Detail

setResult

public void setResult(TestResult result,
                      BuildListener listener)
Overwrites the TestResult by a new data set.


getResult

public TestResult getResult()
Description copied from class: AbstractTestResultAction
Returns the object that represents the actual test result. This method is used by the remote API so that the XML/JSON that we are sending won't contain unnecessary indirection (that is, AbstractTestResultAction in between.

If such a concept doesn't make sense for a particular subtype, return this.

Specified by:
getResult in class AbstractTestResultAction<TestResultAction>

getFailCount

public int getFailCount()
Description copied from class: AbstractTestResultAction
Gets the number of failed tests.

Specified by:
getFailCount in class AbstractTestResultAction<TestResultAction>

getSkipCount

public int getSkipCount()
Description copied from class: AbstractTestResultAction
Gets the number of skipped tests.

Overrides:
getSkipCount in class AbstractTestResultAction<TestResultAction>

getTotalCount

public int getTotalCount()
Description copied from class: AbstractTestResultAction
Gets the total number of tests.

Specified by:
getTotalCount in class AbstractTestResultAction<TestResultAction>

getFailedTests

public List<CaseResult> getFailedTests()
Description copied from class: AbstractTestResultAction
A shortcut for summary.jelly

Overrides:
getFailedTests in class AbstractTestResultAction<TestResultAction>
Returns:
List of failed tests from associated test result.

getTarget

public Object getTarget()
Specified by:
getTarget in interface org.kohsuke.stapler.StaplerProxy

getActions

public List<TestAction> getActions(TestObject object)

setData

public void setData(List<TestResultAction.Data> testData)

readResolve

public Object readResolve()
Overrides:
readResolve in class AbstractTestResultAction<TestResultAction>


Copyright © 2004-2013. All Rights Reserved.