|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.AbstractModelObject
hudson.tasks.junit.TestObject
hudson.tasks.test.TestObject
hudson.tasks.test.TestResult
hudson.tasks.test.TabulatedResult
hudson.tasks.test.MetaTabulatedResult
hudson.tasks.junit.TestResult
public final class TestResult
Root of all the test results for one build.
Constructor Summary | |
---|---|
TestResult()
Creates an empty result. |
|
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. |
Method Summary | |
---|---|
PackageResult |
byPackage(String packageName)
|
TestResult |
findCorrespondingResult(String id)
Find the test result corresponding to the one identified by id>
withint 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. |
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. |
AbstractBuild<?,?> |
getOwner()
|
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 |
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. |
Methods inherited from class hudson.tasks.test.TestResult |
---|
annotate, getBuildResult, getPreviousResult, getResultInBuild, toPrettyString |
Methods inherited from class hudson.tasks.test.TestObject |
---|
doSubmitDescription, getApi, getDescription, getDurationString, getHistory, getId, getRelativePathFrom, getSafeName, getSearchUrl, getTestAction, getTestActions, getTestResultAction, getTopLevelTestResult, getTotalCount, getUrl, safe, setDescription, uniquifyName |
Methods inherited from class hudson.model.AbstractModelObject |
---|
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TestResult()
@Deprecated public TestResult(long buildTime, org.apache.tools.ant.DirectoryScanner results) throws IOException
IOException
public 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 passed
IOException
Method Detail |
---|
public TestObject getParent()
TestObject
TabulatedResult.getChildren()
.
getParent
in class TestObject
public void setParent(TestObject parent)
TestResult
setParent
in class TestResult
public TestResult getTestResult()
TestObject
getTestResult
in class TestObject
public 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.
IOException
public void parse(long buildTime, File baseDir, String[] reportFiles) throws IOException
IOException
public void parse(long buildTime, Iterable<File> reportFiles) throws IOException
IOException
public void parse(File reportFile) throws IOException
IOException
public String getDisplayName()
public AbstractBuild<?,?> getOwner()
getOwner
in class TestObject
public TestResult findCorrespondingResult(String id)
TestObject
id>
withint this test result.
findCorrespondingResult
in class TestObject
id
- The path to the original test result
public String getTitle()
TestResult
getTitle
in class TestResult
public String getChildTitle()
getChildTitle
in class TabulatedResult
@Exported(visibility=999) public float getDuration()
TestResult
getDuration
in class TestResult
@Exported(visibility=999) public int getPassCount()
TestResult
getPassCount
in class TestResult
@Exported(visibility=999) public int getFailCount()
TestResult
getFailCount
in class TestResult
@Exported(visibility=999) public int getSkipCount()
TestResult
getSkipCount
in class TestResult
@Exported(visibility=999) public boolean isEmpty()
public List<CaseResult> getFailedTests()
MetaTabulatedResult
getFailedTests
in class MetaTabulatedResult
public Collection<? extends TestResult> getPassedTests()
getPassedTests
in class TestResult
public Collection<? extends TestResult> getSkippedTests()
getSkippedTests
in class TestResult
public int getFailedSince()
getFailedSince
in class TestResult
public Run<?,?> getFailedSinceRun()
getFailedSinceRun
in class TestResult
public String getStdout()
SuiteResult.getStdout()
.
getStdout
in class TestResult
public String getStderr()
getStderr
in class TestResult
getStdout()
public String getErrorStackTrace()
getErrorStackTrace
in class TestResult
public String getErrorDetails()
getErrorDetails
in class TestResult
public boolean isPassed()
isPassed
in class TestResult
public Collection<PackageResult> getChildren()
TabulatedResult
getChildren
in class TabulatedResult
TestObject.getParent()
public boolean hasChildren()
hasChildren
in class TabulatedResult
@Exported(inline=true, visibility=9) public Collection<SuiteResult> getSuites()
public String getName()
TestObject
getName
in class TestObject
public Object getDynamic(String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
getDynamic
in class TestObject
public PackageResult byPackage(String packageName)
public SuiteResult getSuite(String name)
public void setParentAction(AbstractTestResultAction action)
TestResult
setParentAction
in class TestResult
public AbstractTestResultAction getParentAction()
TestResult
getParentAction
in class TestResult
public void tally()
tally
in class TestResult
public void freeze(TestResultAction parent)
parsed
so far.
After the data is frozen, more files can be parsed and then freeze can be called again.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |