Package hudson.tasks.test
Class SimpleCaseResult
java.lang.Object
hudson.model.AbstractModelObject
hudson.tasks.junit.TestObject
hudson.tasks.test.TestObject
hudson.tasks.test.TestResult
hudson.tasks.test.SimpleCaseResult
- All Implemented Interfaces:
ModelObject,SearchableModelObject,SearchItem,Serializable
The simplest possible case result, with no language ties.
Acts as if it passed, has no children, and has no failed or skipped tests.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected floatstatic final List<TestAction>An empty list of actions, useful for testsprotected final List<SimpleCaseResult>protected AbstractTestResultAction -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFind the test result corresponding to the one identified byidwithin this test result.floatTime took to run this test.intGets the total number of failed tests.Collection<? extends TestResult>Gets the "children" of this test result that failedgetName()Gets the name of this object.Reverse pointer ofTabulatedResult.getChildren().Returns the action that points to the top level test result includes this test result.intGets the total number of passed tests.Collection<? extends TestResult>Gets the "children" of this test result that passedRun<?,?> getRun()intGets the total number of skipped tests.Collection<? extends TestResult>Gets the "children" of this test result that were skippedGet a list of all TestActions associated with this TestObject.getTitle()Gets the human readable title of this result object.booleanisFailed()Returns true iff this test failed.booleanisPassed()Let's pretend that our trivial test result always passes.booleanTests whether the test was skipped or not.voidsetParentAction(AbstractTestResultAction parentAction) Sets the parent action, which means the action that binds this particular case result to a build.Methods inherited from class hudson.tasks.test.TestResult
annotate, getBuildResult, getErrorDetails, getErrorStackTrace, getFailedSince, getFailedSinceRun, getPreviousResult, getProperties, getResultInRun, getStderr, getStdout, setParent, tally, toPrettyStringMethods inherited from class hudson.tasks.test.TestObject
doSubmitDescription, getApi, getDescription, getDurationString, getDynamic, getFullDisplayName, getFullName, getHistory, getId, getRelativePathFrom, getResultInBuild, getSafeName, getSearchUrl, getTestAction, getTestResult, getTestResultAction, getTopLevelTestResult, getTotalCount, getUrl, safe, setDescription, uniquifyNameMethods inherited from class hudson.tasks.junit.TestObject
getOwnerMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.search.SearchItem
getSearchGroup, getSearchIcon
-
Field Details
-
parentAction
-
listOnlyContainingThisObject
-
duration
protected float duration -
EMPTY_ACTION_LIST
An empty list of actions, useful for tests
-
-
Constructor Details
-
SimpleCaseResult
public SimpleCaseResult(float duration) -
SimpleCaseResult
public SimpleCaseResult()
-
-
Method Details
-
setParentAction
Sets the parent action, which means the action that binds this particular case result to a build. Should not be null.- Overrides:
setParentActionin classTestResult- Parameters:
parentAction-
-
getParentAction
Description copied from class:TestResultReturns the action that points to the top level test result includes this test result.- Overrides:
getParentActionin classTestResult- Returns:
- action The action that points to the top level test result.
-
getParent
Description copied from class:TestObjectReverse pointer ofTabulatedResult.getChildren().- Specified by:
getParentin classTestObject- Returns:
- the parent
TestObject.
-
findCorrespondingResult
Description copied from class:TestObjectFind the test result corresponding to the one identified byidwithin this test result.- Specified by:
findCorrespondingResultin classTestObject- Parameters:
id- The path to the original test result- Returns:
- A corresponding test result, or null if there is no corresponding result.
-
getFailedTests
Gets the "children" of this test result that failed- Overrides:
getFailedTestsin classTestResult- Returns:
- the children of this test result, if any, or an empty collection
-
getPassedTests
Gets the "children" of this test result that passed- Overrides:
getPassedTestsin classTestResult- Returns:
- the children of this test result, if any, or an empty collection
-
getSkippedTests
Gets the "children" of this test result that were skipped- Overrides:
getSkippedTestsin classTestResult- Returns:
- the children of this test result, if any, or an empty list
-
isPassed
public boolean isPassed()Let's pretend that our trivial test result always passes.- Overrides:
isPassedin classTestResult- Returns:
- always true
-
isSkipped
public boolean isSkipped()Tests whether the test was skipped or not.- Returns:
- true if the test was not executed, false otherwise.
-
isFailed
public boolean isFailed()Returns true iff this test failed. -
getDuration
public float getDuration()Time took to run this test. In seconds.- Overrides:
getDurationin classTestResult- Returns:
- the time in seconds the test ran.
-
getName
Gets the name of this object.- Overrides:
getNamein classTestObject- Returns:
- the name of this object.
-
getPassCount
public int getPassCount()Gets the total number of passed tests.- Overrides:
getPassCountin classTestResult- Returns:
- the total number of passed tests.
-
getFailCount
public int getFailCount()Gets the total number of failed tests.- Overrides:
getFailCountin classTestResult- Returns:
- the total number of failed tests.
-
getSkipCount
public int getSkipCount()Gets the total number of skipped tests.- Overrides:
getSkipCountin classTestResult- Returns:
- the total number of skipped tests.
-
getTitle
Gets the human readable title of this result object.- Overrides:
getTitlein classTestResult- Returns:
- the human readable title of this result object.
-
getDisplayName
-
getRun
- Overrides:
getRunin classTestObject- Returns:
- the run in which this test was executed.
-
getTestActions
Description copied from class:TestObjectGet a list of all TestActions associated with this TestObject.- Overrides:
getTestActionsin classTestObject
-