public final class CaseResult extends hudson.tasks.test.TestResult implements Comparable<CaseResult>
| Modifier and Type | Class and Description |
|---|---|
static class |
CaseResult.Status
Constants that represent the status of this test.
|
| Constructor and Description |
|---|
CaseResult(hudson.tasks.test.TestObject parent,
JUnitTestInfo testInfo) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(CaseResult that) |
hudson.tasks.test.TestResult |
findCorrespondingResult(String id)
Case results have no children
|
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() |
int |
getFailedSince()
If this test failed, then return the build number when this test started failing.
|
hudson.model.Run<?,?> |
getFailedSinceRun() |
Collection<? extends hudson.tasks.test.TestResult> |
getFailedTests()
Gets the "children" of this test result that failed
|
String |
getFullName() |
hudson.tasks.junit.History |
getHistory() |
JUnitMetricsInfo |
getMetrics() |
String |
getName()
Gets the name of the test, which is returned from
TestCase.getName() |
hudson.model.AbstractBuild<?,?> |
getOwner() |
String |
getPackageName()
Gets the package name of a test case
|
hudson.tasks.test.TestObject |
getParent() |
int |
getPassCount() |
Collection<? extends hudson.tasks.test.TestResult> |
getPassedTests()
Gets the "children" of this test result that passed
|
CaseResult |
getPreviousResult() |
String |
getRootUrl(String urlName) |
String |
getRootUrl(hudson.tasks.junit.TestAction testAction) |
String |
getSafeName()
Gets the version of
getName() that's URL-safe. |
String |
getSimpleName()
Gets the simple (not qualified) class name.
|
int |
getSkipCount() |
Collection<? extends hudson.tasks.test.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.
|
List<hudson.tasks.junit.TestAction> |
getTestActions() |
ProjectResultBuildAction |
getTestResultAction() |
String |
getTitle()
Gets the human readable title of this result object.
|
boolean |
isPassed() |
boolean |
isSkipped()
Tests whether the test was skipped or not.
|
annotate, getBuildResult, getParentAction, getResultInRun, setParent, setParentAction, tally, toPrettyStringdoSubmitDescription, getApi, getDescription, getDurationString, getDynamic, getFullDisplayName, getId, getRelativePathFrom, getResultInBuild, getSearchUrl, getTestAction, getTestResult, getTopLevelTestResult, getTotalCount, getUrl, safe, setDescription, uniquifyNamepublic CaseResult(hudson.tasks.test.TestObject parent,
JUnitTestInfo testInfo)
public hudson.tasks.test.TestObject getParent()
getParent in class hudson.tasks.test.TestObjectpublic List<hudson.tasks.junit.TestAction> getTestActions()
getTestActions in class hudson.tasks.test.TestObjectpublic ProjectResultBuildAction getTestResultAction()
getTestResultAction in class hudson.tasks.test.TestObjectpublic String getDisplayName()
getDisplayName in interface hudson.model.ModelObject@Exported(visibility=999) public String getName()
TestCase.getName()
Note that this may contain any URL-unfriendly character.
getName in class hudson.tasks.test.TestObjectpublic String getTitle()
getTitle in class hudson.tasks.test.TestResult@Exported(visibility=9) public float getDuration()
getDuration in class hudson.tasks.test.TestResultpublic String getSafeName()
getName() that's URL-safe.getSafeName in class hudson.tasks.test.TestObject@Exported(visibility=9) public String getClassName()
public String getSimpleName()
public String getPackageName()
public String getFullName()
getFullName in class hudson.tasks.test.TestObjectpublic int getFailCount()
getFailCount in class hudson.tasks.test.TestResultpublic int getSkipCount()
getSkipCount in class hudson.tasks.test.TestResultpublic int getPassCount()
getPassCount in class hudson.tasks.test.TestResult@Exported(visibility=9) public int getFailedSince()
getFailedSince in class hudson.tasks.test.TestResultpublic hudson.model.Run<?,?> getFailedSinceRun()
getFailedSinceRun in class hudson.tasks.test.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 ModuleResult.getStdout().
getStdout in class hudson.tasks.test.TestResult@Exported public String getStderr()
getStderr in class hudson.tasks.test.TestResultgetStdout()public CaseResult getPreviousResult()
getPreviousResult in class hudson.tasks.test.TestResultpublic JUnitMetricsInfo getMetrics()
public hudson.tasks.test.TestResult findCorrespondingResult(String id)
findCorrespondingResult in class hudson.tasks.test.TestObjectpublic Collection<? extends hudson.tasks.test.TestResult> getFailedTests()
getFailedTests in class hudson.tasks.test.TestResultpublic Collection<? extends hudson.tasks.test.TestResult> getPassedTests()
getPassedTests in class hudson.tasks.test.TestResultpublic Collection<? extends hudson.tasks.test.TestResult> getSkippedTests()
getSkippedTests in class hudson.tasks.test.TestResult@Exported public String getErrorStackTrace()
getErrorStackTrace in class hudson.tasks.test.TestResult@Exported public String getErrorDetails()
getErrorDetails in class hudson.tasks.test.TestResultpublic boolean isPassed()
isPassed in class hudson.tasks.test.TestResult@Exported(visibility=9) public boolean isSkipped()
public hudson.model.AbstractBuild<?,?> getOwner()
getOwner in class hudson.tasks.junit.TestObjectpublic int compareTo(CaseResult that)
compareTo in interface Comparable<CaseResult>@Exported(name="status",
visibility=9)
public CaseResult.Status getStatus()
public String getRootUrl(hudson.tasks.junit.TestAction testAction)
public hudson.tasks.junit.History getHistory()
getHistory in class hudson.tasks.test.TestObjectCopyright © 2004-2016. All Rights Reserved.