public final class TestResult extends MetaTabulatedResult
| Constructor and Description |
|---|
TestResult()
Creates an empty result.
|
TestResult(boolean keepLongStdio) |
TestResult(long buildTime,
org.apache.tools.ant.DirectoryScanner results)
Deprecated.
|
TestResult(long buildTime,
org.apache.tools.ant.DirectoryScanner results,
boolean keepLongStdio)
Collect reports from the given
DirectoryScanner, while
filtering out all files that were created before the given time. |
| Modifier and Type | Method and Description |
|---|---|
PackageResult |
byPackage(String packageName) |
TestResult |
findCorrespondingResult(String id)
Find the test result corresponding to the one identified by
id>
within this test result. |
void |
freeze(TestResultAction parent)
Builds up the transient part of the data structure
from results
parsed so far. |
Collection<PackageResult> |
getChildren()
Gets the child test result objects.
|
String |
getChildTitle() |
String |
getDisplayName() |
float |
getDuration()
Time it took to run this test.
|
Object |
getDynamic(String token,
org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
String |
getErrorDetails()
If there was an error or a failure, this is the text from the message.
|
String |
getErrorStackTrace()
If there was an error or a failure, this is the stack trace, or otherwise null.
|
int |
getFailCount()
Gets the total number of failed tests.
|
int |
getFailedSince()
If this test failed, then return the build number
when this test started failing.
|
hudson.model.Run<?,?> |
getFailedSinceRun()
If this test failed, then return the run
when this test started failing.
|
List<CaseResult> |
getFailedTests()
All failed tests.
|
String |
getName()
Gets the name of this object.
|
TestObject |
getParent()
Reverse pointer of
TabulatedResult.getChildren(). |
AbstractTestResultAction |
getParentAction()
Returns the action that points to the top level test result includes
this test result.
|
int |
getPassCount()
Gets the total number of passed tests.
|
Collection<? extends TestResult> |
getPassedTests()
Gets the "children" of this test result that passed
|
hudson.model.Run<?,?> |
getRun() |
int |
getSkipCount()
Gets the total number of skipped tests.
|
Collection<? extends TestResult> |
getSkippedTests()
Gets the "children" of this test result that were skipped
|
String |
getStderr()
The stderr of this test.
|
String |
getStdout()
The stdout of this test.
|
SuiteResult |
getSuite(String name) |
Collection<SuiteResult> |
getSuites() |
TestResult |
getTestResult()
Returns the top level test result data.
|
String |
getTitle()
Gets the human readable title of this result object.
|
boolean |
hasChildren()
Whether this test result has children.
|
boolean |
isEmpty()
Returns true if this doesn't have any any test results.
|
boolean |
isPassed() |
void |
parse(File reportFile)
Parses an additional report file.
|
void |
parse(long buildTime,
org.apache.tools.ant.DirectoryScanner results)
Collect reports from the given
DirectoryScanner, while
filtering out all files that were created before the given time. |
void |
parse(long buildTime,
File baseDir,
String[] reportFiles)
Collect reports from the given report files, while
filtering out all files that were created before the given time.
|
void |
parse(long buildTime,
Iterable<File> reportFiles)
Collect reports from the given report files
|
void |
setParent(TestObject parent)
Sets the parent test result
|
void |
setParentAction(AbstractTestResultAction action)
If the concept of a parent action is important to a subclass, then it should
provide a non-noop implementation of this method.
|
void |
tally()
Recount my children.
|
annotate, getBuildResult, getPreviousResult, getResultInRun, toPrettyStringdoSubmitDescription, getApi, getDescription, getDurationString, getFullDisplayName, getFullName, getHistory, getId, getRelativePathFrom, getResultInBuild, getSafeName, getSearchUrl, getTestAction, getTestActions, getTestResultAction, getTopLevelTestResult, getTotalCount, getUrl, safe, setDescription, uniquifyNamegetOwnerpublic TestResult()
public TestResult(boolean keepLongStdio)
@Deprecated public TestResult(long buildTime, org.apache.tools.ant.DirectoryScanner results) throws IOException
IOExceptionpublic TestResult(long buildTime,
org.apache.tools.ant.DirectoryScanner results,
boolean keepLongStdio)
throws IOException
DirectoryScanner, while
filtering out all files that were created before the given time.keepLongStdio - if true, retain a suite's complete stdout/stderr even if this is huge and the suite passedIOExceptionpublic TestObject getParent()
TestObjectTabulatedResult.getChildren().getParent in class TestObjectpublic void setParent(TestObject parent)
TestResultsetParent in class TestResultpublic TestResult getTestResult()
TestObjectgetTestResult in class TestObjectpublic void parse(long buildTime,
org.apache.tools.ant.DirectoryScanner results)
throws IOException
DirectoryScanner, while
filtering out all files that were created before the given time.IOExceptionpublic void parse(long buildTime,
File baseDir,
String[] reportFiles)
throws IOException
IOExceptionpublic void parse(long buildTime,
Iterable<File> reportFiles)
throws IOException
IOExceptionpublic void parse(File reportFile) throws IOException
IOExceptionpublic String getDisplayName()
public hudson.model.Run<?,?> getRun()
getRun in class TestObjectpublic TestResult findCorrespondingResult(String id)
TestObjectid>
within this test result.findCorrespondingResult in class TestObjectid - The path to the original test resultpublic String getTitle()
TestResultgetTitle in class TestResultpublic String getChildTitle()
getChildTitle in class TabulatedResult@Exported(visibility=999) public float getDuration()
TestResultgetDuration in class TestResult@Exported(visibility=999) public int getPassCount()
TestResultgetPassCount in class TestResult@Exported(visibility=999) public int getFailCount()
TestResultgetFailCount in class TestResult@Exported(visibility=999) public int getSkipCount()
TestResultgetSkipCount in class TestResult@Exported(visibility=999) public boolean isEmpty()
public List<CaseResult> getFailedTests()
MetaTabulatedResultgetFailedTests in class MetaTabulatedResultpublic Collection<? extends TestResult> getPassedTests()
getPassedTests in class TestResultpublic Collection<? extends TestResult> getSkippedTests()
getSkippedTests in class TestResultpublic int getFailedSince()
getFailedSince in class TestResultpublic hudson.model.Run<?,?> getFailedSinceRun()
getFailedSinceRun in class TestResultpublic String getStdout()
SuiteResult.getStdout().getStdout in class TestResultpublic String getStderr()
getStderr in class TestResultgetStdout()public String getErrorStackTrace()
getErrorStackTrace in class TestResultpublic String getErrorDetails()
getErrorDetails in class TestResultpublic boolean isPassed()
isPassed in class TestResultpublic Collection<PackageResult> getChildren()
TabulatedResultgetChildren in class TabulatedResultTestObject.getParent()public boolean hasChildren()
hasChildren in class TabulatedResult@Exported(inline=true,
visibility=9)
public Collection<SuiteResult> getSuites()
public String getName()
TestObjectgetName in class TestObjectpublic Object getDynamic(String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
getDynamic in class TestObjectpublic PackageResult byPackage(String packageName)
public SuiteResult getSuite(String name)
public void setParentAction(AbstractTestResultAction action)
TestResultsetParentAction in class TestResultpublic AbstractTestResultAction getParentAction()
TestResultgetParentAction in class TestResultpublic void tally()
tally in class TestResultpublic void freeze(TestResultAction parent)
parsed so far.
After the data is frozen, more files can be parsed and then freeze can be called again.
Copyright © 2004-2015. All Rights Reserved.