|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.tasks.test.AbstractTestResultAction<T>
@ExportedBean public abstract class AbstractTestResultAction<T extends AbstractTestResultAction>
Common base class for recording test result.
Project
and Build
recognizes Action
s that derive from this,
and displays it nicely (regardless of the underlying implementation.)
Field Summary | |
---|---|
AbstractBuild<?,?> |
owner
|
Constructor Summary | |
---|---|
protected |
AbstractTestResultAction(AbstractBuild owner)
|
Method Summary | |
---|---|
void |
doGraph(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Generates a PNG image for the test result trend. |
void |
doGraphMap(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Generates a clickable map HTML for doGraph(StaplerRequest, StaplerResponse) . |
TestResult |
findCorrespondingResult(String id)
|
TestResult |
findPreviousCorresponding(TestResult test)
|
Api |
getApi()
Exposes this object to the remote API. |
HealthReport |
getBuildHealth()
Get this Action 's HealthReport . |
protected String |
getDescription(TestObject object)
TestObject s do not have their own persistence mechanism, so updatable data of TestObject s
need to be persisted by the owning AbstractTestResultAction , and this method and
setDescription(TestObject, String) provides that logic. |
String |
getDisplayName()
Gets the string to be displayed. |
abstract int |
getFailCount()
Gets the number of failed tests. |
List<CaseResult> |
getFailedTests()
A shortcut for summary.jelly |
String |
getFailureDiffString()
Gets the diff string of failures. |
String |
getIconFileName()
Gets the file name of the icon. |
T |
getPreviousResult()
Gets the test result of the previous build, if it's recorded, or null. |
abstract Object |
getResult()
Returns the object that represents the actual test result. |
int |
getSkipCount()
Gets the number of skipped tests. |
String |
getTestResultPath(TestResult it)
Returns a full path down to a test result |
abstract int |
getTotalCount()
Gets the total number of tests. |
String |
getUrlName()
Gets the URL path name. |
Object |
readResolve()
|
protected void |
setDescription(TestObject object,
String description)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final AbstractBuild<?,?> owner
Constructor Detail |
---|
protected AbstractTestResultAction(AbstractBuild owner)
Method Detail |
---|
@Exported(visibility=2) public abstract int getFailCount()
@Exported(visibility=2) public int getSkipCount()
@Exported(visibility=2) public abstract int getTotalCount()
public final String getFailureDiffString()
public String getDisplayName()
Action
getDisplayName
in interface Action
getDisplayName
in interface ModelObject
@Exported(visibility=2) public String getUrlName()
Action
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 Action
s.
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.
getUrlName
in interface Action
Action.getIconFileName()
.Functions.getActionUrl(String, Action)
public String getIconFileName()
Action
getIconFileName
in interface Action
If an absolute file name that starts from '/' is returned (like "/plugin/foo/abc.gif'), then it will be interpreted as a path from the context root of Jenkins. This is useful to pick up image files from a plugin.
Finally, return null to hide it from the task list. This is normally not very useful, but this can be used for actions that only contribute floatBox.jelly and no task list item. The other case where this is useful is to avoid showing links that require a privilege when the user is anonymous.
Functions.isAnonymous()
,
Functions.getIconFilePath(Action)
public HealthReport getBuildHealth()
HealthReportingAction
Action
's HealthReport
.
getBuildHealth
in interface HealthReportingAction
null
if the Action does not want to
contribute a HealthReport.public Api getApi()
public abstract Object getResult()
AbstractTestResultAction
in between.
If such a concept doesn't make sense for a particular subtype, return this.
public T getPreviousResult()
public TestResult findPreviousCorresponding(TestResult test)
public TestResult findCorrespondingResult(String id)
public List<CaseResult> getFailedTests()
public void doGraph(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException
IOException
public void doGraphMap(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException
doGraph(StaplerRequest, StaplerResponse)
.
IOException
public String getTestResultPath(TestResult it)
protected String getDescription(TestObject object)
TestObject
s do not have their own persistence mechanism, so updatable data of TestObject
s
need to be persisted by the owning AbstractTestResultAction
, and this method and
setDescription(TestObject, String)
provides that logic.
The default implementation stores information in the 'this' object.
TestObject.getDescription()
protected void setDescription(TestObject object, String description)
public Object readResolve()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |