|
||||||||||
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.junit.CaseResult
public final class CaseResult
One test result.
Nested Class Summary | |
---|---|
static class |
CaseResult.Status
Constants that represent the status of this test. |
Method Summary | |
---|---|
int |
compareTo(CaseResult that)
|
TestResult |
findCorrespondingResult(String id)
Case results have no children |
void |
freeze(SuiteResult parent)
|
int |
getAge()
Gets the number of consecutive builds (including this) that this test case has been failing. |
String |
getClassName()
Gets the class name of a test class. |
String |
getDisplayName()
|
float |
getDuration()
Gets the duration of the test, in seconds |
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. |
Collection<? extends TestResult> |
getFailedTests()
Gets the "children" of this test result that failed |
String |
getFullName()
|
String |
getName()
Gets the name of the test, which is returned from TestCase.getName() |
AbstractBuild<?,?> |
getOwner()
|
String |
getPackageName()
Gets the package name of a test case |
ClassResult |
getParent()
Reverse pointer of TabulatedResult.getChildren() . |
int |
getPassCount()
Gets the total number of passed tests. |
Collection<? extends TestResult> |
getPassedTests()
Gets the "children" of this test result that passed |
CaseResult |
getPreviousResult()
Gets the counter part of this TestResult in the previous run. |
String |
getSafeName()
Gets the version of getName() that's URL-safe. |
String |
getSimpleName()
Gets the simple (not qualified) class name. |
int |
getSkipCount()
Gets the total number of skipped tests. |
String |
getSkippedMessage()
Provides the reason given for the test being being skipped. |
Collection<? extends TestResult> |
getSkippedTests()
Gets the "children" of this test result that were skipped |
CaseResult.Status |
getStatus()
|
String |
getStderr()
The stderr of this test. |
String |
getStdout()
The stdout of this test. |
SuiteResult |
getSuiteResult()
|
String |
getTitle()
Gets the human readable title of this result object. |
boolean |
isPassed()
|
boolean |
isSkipped()
Tests whether the test was skipped or not. |
void |
setParentSuiteResult(SuiteResult parent)
|
Methods inherited from class hudson.tasks.test.TestResult |
---|
annotate, getBuildResult, getParentAction, getResultInBuild, setParent, setParentAction, tally, toPrettyString |
Methods inherited from class hudson.tasks.test.TestObject |
---|
doSubmitDescription, getApi, getDescription, getDurationString, getDynamic, getHistory, getId, getRelativePathFrom, getSearchUrl, getTestAction, getTestActions, getTestResult, 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 |
Method Detail |
---|
public ClassResult getParent()
TestObject
TabulatedResult.getChildren()
.
getParent
in class TestObject
public String getDisplayName()
getDisplayName
in interface ModelObject
@Exported(visibility=999) public String getName()
TestCase.getName()
Note that this may contain any URL-unfriendly character.
getName
in class TestObject
public String getTitle()
getTitle
in class TestResult
@Exported(visibility=9) public float getDuration()
getDuration
in class TestResult
public String getSafeName()
getName()
that's URL-safe.
getSafeName
in class TestObject
@Exported(visibility=9) public String getClassName()
public String getSimpleName()
public String getPackageName()
public String getFullName()
public int getFailCount()
TestResult
getFailCount
in class TestResult
public int getSkipCount()
TestResult
getSkipCount
in class TestResult
public int getPassCount()
TestResult
getPassCount
in class TestResult
@Exported(visibility=9) public int getFailedSince()
getFailedSince
in class TestResult
public Run<?,?> getFailedSinceRun()
TestResult
getFailedSinceRun
in class TestResult
@Exported(visibility=9) public int getAge()
@Exported public String getStdout()
Depending on the tool that produced the XML report, this method works somewhat inconsistently. With some tools (such as Maven surefire plugin), you get the accurate information, that is the stdout from this test case. With some other tools (such as the JUnit task in Ant), this method returns the stdout produced by the entire test suite.
If you need to know which is the case, compare this output from SuiteResult.getStdout()
.
getStdout
in class TestResult
@Exported public String getStderr()
getStderr
in class TestResult
getStdout()
public CaseResult getPreviousResult()
TestResult
TestResult
in the previous run.
getPreviousResult
in class TestResult
public TestResult findCorrespondingResult(String id)
findCorrespondingResult
in class TestObject
id
- The path to the original test result
public Collection<? extends TestResult> getFailedTests()
getFailedTests
in class TestResult
public Collection<? extends TestResult> getPassedTests()
getPassedTests
in class TestResult
public Collection<? extends TestResult> getSkippedTests()
getSkippedTests
in class TestResult
@Exported public String getErrorStackTrace()
getErrorStackTrace
in class TestResult
@Exported public String getErrorDetails()
getErrorDetails
in class TestResult
public boolean isPassed()
isPassed
in class TestResult
@Exported(visibility=9) public boolean isSkipped()
@Exported public String getSkippedMessage()
public SuiteResult getSuiteResult()
public AbstractBuild<?,?> getOwner()
getOwner
in class TestObject
public void setParentSuiteResult(SuiteResult parent)
public void freeze(SuiteResult parent)
public int compareTo(CaseResult that)
compareTo
in interface Comparable<CaseResult>
@Exported(name="status", visibility=9) public CaseResult.Status getStatus()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |