public class TestResultAction extends AbstractTestResultAction<TestResultAction> implements org.kohsuke.stapler.StaplerProxy, jenkins.tasks.SimpleBuildStep.LastBuildAction
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.
Modifier and Type | Class and Description |
---|---|
static class |
TestResultAction.Data
Resolves
TestAction s for the given TestObject . |
AbstractTestResultAction.Summarizer
owner, run
Constructor and Description |
---|
TestResultAction(hudson.model.AbstractBuild owner,
TestResult result,
hudson.model.BuildListener listener)
Deprecated.
|
TestResultAction(hudson.model.Run owner,
TestResult result,
hudson.model.TaskListener listener) |
TestResultAction(TestResult result,
hudson.model.BuildListener listener)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
List<TestAction> |
getActions(TestObject object) |
int |
getFailCount()
Gets the number of failed tests.
|
List<CaseResult> |
getFailedTests()
A shortcut for summary.jelly
|
double |
getHealthScaleFactor()
Returns how much to scale the test related health by.
|
List<CaseResult> |
getPassedTests()
A shortcut for scripting
|
Collection<? extends hudson.model.Action> |
getProjectActions() |
TestResult |
getResult()
Returns the object that represents the actual test result.
|
int |
getSkipCount()
Gets the number of skipped tests.
|
List<CaseResult> |
getSkippedTests()
A shortcut for scripting
|
Object |
getTarget() |
int |
getTotalCount()
Gets the total number of tests.
|
Object |
readResolve() |
void |
setData(List<TestResultAction.Data> testData) |
void |
setHealthScaleFactor(double healthScaleFactor) |
void |
setResult(TestResult result,
hudson.model.BuildListener listener)
Deprecated.
|
void |
setResult(TestResult result,
hudson.model.TaskListener listener)
Overwrites the
TestResult by a new data set. |
doGraph, doGraphMap, findCorrespondingResult, findPreviousCorresponding, getApi, getBuildHealth, getDescription, getDisplayName, getFailureDiffString, getIconFileName, getPreviousResult, getTestResultPath, getUrlName, onAttached, onLoad, setDescription
@Deprecated public TestResultAction(hudson.model.AbstractBuild owner, TestResult result, hudson.model.BuildListener listener)
public TestResultAction(hudson.model.Run owner, TestResult result, hudson.model.TaskListener listener)
@Deprecated public TestResultAction(TestResult result, hudson.model.BuildListener listener)
public Collection<? extends hudson.model.Action> getProjectActions()
getProjectActions
in interface jenkins.tasks.SimpleBuildStep.LastBuildAction
public void setResult(TestResult result, hudson.model.TaskListener listener)
TestResult
by a new data set.@Deprecated public void setResult(TestResult result, hudson.model.BuildListener listener)
public TestResult getResult()
AbstractTestResultAction
AbstractTestResultAction
in between.
If such a concept doesn't make sense for a particular subtype, return this.
getResult
in class AbstractTestResultAction<TestResultAction>
public int getFailCount()
AbstractTestResultAction
getFailCount
in class AbstractTestResultAction<TestResultAction>
public int getSkipCount()
AbstractTestResultAction
getSkipCount
in class AbstractTestResultAction<TestResultAction>
public int getTotalCount()
AbstractTestResultAction
getTotalCount
in class AbstractTestResultAction<TestResultAction>
public double getHealthScaleFactor()
AbstractTestResultAction
getHealthScaleFactor
in class AbstractTestResultAction<TestResultAction>
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 void setHealthScaleFactor(double healthScaleFactor)
public List<CaseResult> getFailedTests()
AbstractTestResultAction
getFailedTests
in class AbstractTestResultAction<TestResultAction>
public List<CaseResult> getPassedTests()
AbstractTestResultAction
getPassedTests
in class AbstractTestResultAction<TestResultAction>
public List<CaseResult> getSkippedTests()
AbstractTestResultAction
getSkippedTests
in class AbstractTestResultAction<TestResultAction>
public Object getTarget()
getTarget
in interface org.kohsuke.stapler.StaplerProxy
public List<TestAction> getActions(TestObject object)
public void setData(List<TestResultAction.Data> testData)
public Object readResolve()
readResolve
in class AbstractTestResultAction<TestResultAction>
Copyright © 2016. All rights reserved.