hudson.tasks.test
Class AggregatedTestResultAction

java.lang.Object
  extended by hudson.tasks.test.AbstractTestResultAction
      extended by hudson.tasks.test.AggregatedTestResultAction
All Implemented Interfaces:
Action, HealthReportingAction, ModelObject
Direct Known Subclasses:
MatrixTestResult, SurefireAggregatedReport

@ExportedBean
public abstract class AggregatedTestResultAction
extends AbstractTestResultAction

AbstractTestResultAction that aggregates all the test results from the corresponding AbstractBuilds.

(This has nothing to do with AggregatedTestResultPublisher, unfortunately)

Author:
Kohsuke Kawaguchi

Nested Class Summary
static class AggregatedTestResultAction.Child
           
static class AggregatedTestResultAction.ChildReport
          Data-binding bean for the remote API.
 
Field Summary
 List<AggregatedTestResultAction.Child> children
          child builds whose test results are used for aggregation.
 
Fields inherited from class hudson.tasks.test.AbstractTestResultAction
owner
 
Constructor Summary
AggregatedTestResultAction(AbstractBuild owner)
           
 
Method Summary
protected  void add(AbstractTestResultAction child)
           
protected abstract  String getChildName(AbstractTestResultAction tr)
           
protected  AbstractTestResultAction getChildReport(AggregatedTestResultAction.Child child)
          Uses resolveChild(Child) and obtain the AbstractTestResultAction object for the given child.
 List<AggregatedTestResultAction.ChildReport> getChildReports()
          Mainly for the remote API.
protected  String getDescription(TestObject object)
          Deprecated. so that IDE warns you if you accidentally try to call it.
 int getFailCount()
          Gets the number of failed tests.
 List<CaseResult> getFailedTests()
          A shortcut for summary.jelly
 List<AggregatedTestResultAction.ChildReport> getResult()
          Returns the object that represents the actual test result.
 int getSkipCount()
          Gets the number of skipped tests.
 int getTotalCount()
          Gets the total number of tests.
abstract  AbstractBuild<?,?> resolveChild(AggregatedTestResultAction.Child child)
           
protected  void setDescription(TestObject object, String description)
          Deprecated. so that IDE warns you if you accidentally try to call it.
protected  void update(List<? extends AbstractTestResultAction> children)
           
 
Methods inherited from class hudson.tasks.test.AbstractTestResultAction
doGraph, doGraphMap, findCorrespondingResult, findPreviousCorresponding, getApi, getBuildHealth, getDisplayName, getFailureDiffString, getIconFileName, getPreviousResult, getTestResultPath, getUrlName, readResolve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

children

public final List<AggregatedTestResultAction.Child> children
child builds whose test results are used for aggregation.

Constructor Detail

AggregatedTestResultAction

public AggregatedTestResultAction(AbstractBuild owner)
Method Detail

update

protected void update(List<? extends AbstractTestResultAction> children)

add

protected void add(AbstractTestResultAction child)

getFailCount

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

Specified by:
getFailCount in class AbstractTestResultAction

getSkipCount

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

Overrides:
getSkipCount in class AbstractTestResultAction

getTotalCount

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

Specified by:
getTotalCount in class AbstractTestResultAction

getResult

public List<AggregatedTestResultAction.ChildReport> 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

getFailedTests

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

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

getChildReports

@Exported(inline=true)
public List<AggregatedTestResultAction.ChildReport> getChildReports()
Mainly for the remote API. Expose results from children.


getChildName

protected abstract String getChildName(AbstractTestResultAction tr)

resolveChild

public abstract AbstractBuild<?,?> resolveChild(AggregatedTestResultAction.Child child)

getChildReport

protected AbstractTestResultAction getChildReport(AggregatedTestResultAction.Child child)
Uses resolveChild(Child) and obtain the AbstractTestResultAction object for the given child.


getDescription

protected final String getDescription(TestObject object)
Deprecated. so that IDE warns you if you accidentally try to call it.

Since there's no TestObject that points this action as the owner (aggregated TestObjects point to their respective real owners, not 'this'), so this method should be never invoked.

Overrides:
getDescription in class AbstractTestResultAction
See Also:
TestObject.getDescription()

setDescription

protected final void setDescription(TestObject object,
                                    String description)
Deprecated. so that IDE warns you if you accidentally try to call it.

See getDescription(TestObject)

Overrides:
setDescription in class AbstractTestResultAction


Copyright © 2004-2013. All Rights Reserved.