hudson.tasks.test
Class AggregatedTestResultPublisher.TestResultAction

java.lang.Object
  extended by hudson.tasks.test.AbstractTestResultAction
      extended by hudson.tasks.test.AggregatedTestResultPublisher.TestResultAction
All Implemented Interfaces:
Action, HealthReportingAction, ModelObject
Enclosing class:
AggregatedTestResultPublisher

public static final class AggregatedTestResultPublisher.TestResultAction
extends AbstractTestResultAction

Action that serves the aggregated record. TODO: persist some information so that even when some of the individuals are gone, we can still retain some useful information.


Nested Class Summary
static class AggregatedTestResultPublisher.TestResultAction.RunListenerImpl
           
 
Field Summary
 
Fields inherited from class hudson.tasks.test.AbstractTestResultAction
owner
 
Constructor Summary
AggregatedTestResultPublisher.TestResultAction(String jobs, boolean includeFailedBuilds, AbstractBuild<?,?> owner)
           
 
Method Summary
protected  String getDescription(TestObject object)
          Deprecated. so that IDE warns you if you accidentally try to call it.
 List<AbstractProject> getDidntRun()
          Gets the downstream projects that haven't run yet, but expected to produce test results.
 String getDisplayName()
          Gets the string to be displayed.
 int getFailCount()
          Gets the number of failed tests.
 boolean getHasFingerprintAction()
           
 boolean getIncludeFailedBuilds()
           
 List<AbstractTestResultAction> getIndividuals()
          Returns the individual test results that are aggregated.
 Collection<AbstractProject> getJobs()
          Gets the jobs to be monitored.
 List<AbstractProject> getNoFingerprints()
          Gets the downstream projects that have available test results, but do not appear to have fingerprinting enabled.
 Object getResult()
          Returns the object that represents the actual test result.
 int getTotalCount()
          Gets the total number of tests.
 String getUrlName()
          Gets the URL path name.
protected  void setDescription(TestObject object, String description)
          Deprecated. so that IDE warns you if you accidentally try to call it.
 
Methods inherited from class hudson.tasks.test.AbstractTestResultAction
doGraph, doGraphMap, findCorrespondingResult, findPreviousCorresponding, getApi, getBuildHealth, getFailedTests, getFailureDiffString, getIconFileName, getPreviousResult, getSkipCount, getTestResultPath, readResolve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregatedTestResultPublisher.TestResultAction

public AggregatedTestResultPublisher.TestResultAction(String jobs,
                                                      boolean includeFailedBuilds,
                                                      AbstractBuild<?,?> owner)
Method Detail

getJobs

public Collection<AbstractProject> getJobs()
Gets the jobs to be monitored.


getIncludeFailedBuilds

public boolean getIncludeFailedBuilds()

getFailCount

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

Specified by:
getFailCount 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 Object 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

getDescription

protected 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 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

getIndividuals

public List<AbstractTestResultAction> getIndividuals()
Returns the individual test results that are aggregated.


getDidntRun

public List<AbstractProject> getDidntRun()
Gets the downstream projects that haven't run yet, but expected to produce test results.


getNoFingerprints

public List<AbstractProject> getNoFingerprints()
Gets the downstream projects that have available test results, but do not appear to have fingerprinting enabled.


getHasFingerprintAction

public boolean getHasFingerprintAction()

getDisplayName

public String getDisplayName()
Description copied from interface: Action
Gets the string to be displayed. The convention is to capitalize the first letter of each word, such as "Test Result".

Specified by:
getDisplayName in interface Action
Specified by:
getDisplayName in interface ModelObject
Overrides:
getDisplayName in class AbstractTestResultAction

getUrlName

public String getUrlName()
Description copied from interface: Action
Gets the URL path name.

tions For example, if this method returns "xyz", and if the parent object (that this action is associated with) is bound to /foo/bar/zot, then this action object will be exposed to /foo/bar/zot/xyz.

This method should return a string that's unique among other Actions.

The returned string can be an absolute URL, like "http://www.sun.com/", which is useful for directly connecting to external systems.

If the returned string starts with '/', like '/foo', then it's assumed to be relative to the context path of the Jenkins webapp.

Specified by:
getUrlName in interface Action
Overrides:
getUrlName in class AbstractTestResultAction
Returns:
null if this action object doesn't need to be bound to web (when you do that, be sure to also return null from Action.getIconFileName().
See Also:
Functions.getActionUrl(String, Action)


Copyright © 2004-2013. All Rights Reserved.