@ExportedBean public abstract class AbstractTestResultAction<T extends AbstractTestResultAction> extends Object implements hudson.model.HealthReportingAction, jenkins.model.RunAction2
Project and Build recognizes Actions that derive from this,
and displays it nicely (regardless of the underlying implementation.)
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractTestResultAction.Summarizer |
| Modifier and Type | Field and Description |
|---|---|
hudson.model.AbstractBuild<?,?> |
owner
Deprecated.
|
hudson.model.Run<?,?> |
run |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractTestResultAction() |
protected |
AbstractTestResultAction(hudson.model.AbstractBuild owner)
Deprecated.
|
protected |
AbstractTestResultAction(hudson.model.Run owner)
Deprecated.
Use the default constructor and just call
Run.addAction(hudson.model.Action) to associate the build with the action. |
| Modifier and Type | Method and Description |
|---|---|
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) |
hudson.model.Api |
getApi()
Exposes this object to the remote API.
|
hudson.model.HealthReport |
getBuildHealth() |
protected String |
getDescription(TestObject object)
TestObjects do not have their own persistence mechanism, so updatable data of TestObjects
need to be persisted by the owning AbstractTestResultAction, and this method and
setDescription(TestObject, String) provides that logic. |
String |
getDisplayName() |
abstract int |
getFailCount()
Gets the number of failed tests.
|
List<? extends TestResult> |
getFailedTests()
A shortcut for summary.jelly
|
String |
getFailureDiffString()
Gets the diff string of failures.
|
double |
getHealthScaleFactor()
Returns how much to scale the test related health by.
|
String |
getIconFileName() |
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() |
void |
onAttached(hudson.model.Run<?,?> r) |
void |
onLoad(hudson.model.Run<?,?> r) |
Object |
readResolve() |
protected void |
setDescription(TestObject object,
String description) |
public transient hudson.model.Run<?,?> run
@Deprecated public transient hudson.model.AbstractBuild<?,?> owner
protected AbstractTestResultAction()
@Deprecated protected AbstractTestResultAction(hudson.model.Run owner)
Run.addAction(hudson.model.Action) to associate the build with the action.@Deprecated protected AbstractTestResultAction(hudson.model.AbstractBuild owner)
public void onAttached(hudson.model.Run<?,?> r)
onAttached in interface jenkins.model.RunAction2public void onLoad(hudson.model.Run<?,?> r)
onLoad in interface jenkins.model.RunAction2@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()
getDisplayName in interface hudson.model.ActiongetDisplayName in interface hudson.model.ModelObject@Exported(visibility=2) public String getUrlName()
getUrlName in interface hudson.model.Actionpublic String getIconFileName()
getIconFileName in interface hudson.model.Actionpublic hudson.model.HealthReport getBuildHealth()
getBuildHealth in interface hudson.model.HealthReportingActionpublic double getHealthScaleFactor()
1.0 to have the test health be the percentage of tests passing so 20% of tests
failing will report as 80% health. A factor of 2.0 will mean that 20% of tests failing will report as 60%
health. A factor of 2.5 will mean that 20% of test failing will report as 50% health. A factor of
4.0 will mean that 20% of tests failing will report as 20% health. A factor of 5.0 will mean
that 20% (or more) of tests failing will report as 0% health. A factor of 0.0 will disable test health
reporting.public hudson.model.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<? extends TestResult> getFailedTests()
public void doGraph(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException
IOExceptionpublic void doGraphMap(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException
doGraph(StaplerRequest, StaplerResponse).IOExceptionpublic String getTestResultPath(TestResult it)
protected String getDescription(TestObject object)
TestObjects do not have their own persistence mechanism, so updatable data of TestObjects
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()
Copyright © 2004-2015. All Rights Reserved.