Package hudson.tasks.junit
Class ClassResult
- All Implemented Interfaces:
ModelObject,SearchableModelObject,SearchItem,Serializable,Comparable<ClassResult>
Cumulative test result of a test class.
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Field Summary
Fields inherited from class hudson.tasks.test.TabulatedResult
testsByBlock -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(CaseResult r) intcompareTo(ClassResult that) booleanFind the test result corresponding to the one identified byidwithin this test result.getCaseResult(String name) Gets the child test result objects.Get a simple name for the type of children theTabulatedResult.getChildren()method returns, for example "case", "class" or "package".floatTime it took to run this test.getDynamic(String name, org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) intGets the total number of failed tests.Gets the full name of this object.getName()Gets the name of this object.Reverse pointer ofTabulatedResult.getChildren().intGets the total number of passed tests.Gets the counter part of thisTestResultin the previous run.Gets the relative path to this test case from the given object.Run<?,?> getRun()Gets the version ofTestObject.getName()that's URL-safe.intGets the total number of skipped tests.longgetTitle()Gets the human readable title of this result object.booleaninthashCode()voidsetStartTime(long start) voidtally()Recount my children.Methods inherited from class hudson.tasks.test.TabulatedResult
blockToTestResult, getPipelineBlockWithTests, hasMultipleBlocks, populateBlocksMethods inherited from class hudson.tasks.test.TestResult
annotate, getBuildResult, getErrorDetails, getErrorStackTrace, getFailedSince, getFailedSinceRun, getFailedTests, getParentAction, getPassedTests, getProperties, getResultInRun, getSkippedTests, getStderr, getStdout, isPassed, setParent, setParentAction, toPrettyStringMethods inherited from class hudson.tasks.test.TestObject
doSubmitDescription, getApi, getDescription, getDurationString, getHistory, getId, getResultInBuild, getSearchUrl, getTestAction, getTestActions, 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, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.search.SearchItem
getSearchGroup, getSearchIcon
-
Constructor Details
-
ClassResult
-
-
Method Details
-
getRun
- Overrides:
getRunin classTestObject- Returns:
- the run in which this test was executed.
-
getParent
Description copied from class:TestObjectReverse pointer ofTabulatedResult.getChildren().- Specified by:
getParentin classTestObject- Returns:
- the parent
TestObject.
-
getPreviousResult
Description copied from class:TestResultGets the counter part of thisTestResultin the previous run.- Overrides:
getPreviousResultin classTestResult- Returns:
- null if no such counter part exists.
-
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.
-
getTitle
Description copied from class:TestResultGets the human readable title of this result object.- Overrides:
getTitlein classTestResult- Returns:
- the human readable title of this result object.
-
getChildTitle
- Overrides:
getChildTitlein classTabulatedResult
-
getChildType
Description copied from class:TabulatedResultGet a simple name for the type of children theTabulatedResult.getChildren()method returns, for example "case", "class" or "package".- Overrides:
getChildTypein classTabulatedResult- Returns:
- the type of children this result has, all lowercase.
-
getName
Description copied from class:TestObjectGets the name of this object.- Overrides:
getNamein classTestObject- Returns:
- the name of this object.
-
getSafeName
Description copied from class:TestObjectGets the version ofTestObject.getName()that's URL-safe.- Overrides:
getSafeNamein classTestObject- Returns:
- the URL-safe name of this object.
-
getCaseResult
-
getDynamic
public Object getDynamic(String name, org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) - Overrides:
getDynamicin classTestObject
-
getChildren
Description copied from class:TabulatedResultGets the child test result objects.- Specified by:
getChildrenin classTabulatedResult- Returns:
- the child test result objects.
- See Also:
-
hasChildren
public boolean hasChildren()- Specified by:
hasChildrenin classTabulatedResult
-
getDuration
public float getDuration()Description copied from class:TestResultTime it took to run this test. In seconds.- Overrides:
getDurationin classTestResult- Returns:
- the time in seconds the test ran.
-
getStartTime
public long getStartTime() -
getPassCount
@Exported public int getPassCount()Description copied from class:TestResultGets the total number of passed tests.- Overrides:
getPassCountin classTestResult- Returns:
- the total number of passed tests.
-
getFailCount
@Exported public int getFailCount()Description copied from class:TestResultGets the total number of failed tests.- Overrides:
getFailCountin classTestResult- Returns:
- the total number of failed tests.
-
getSkipCount
@Exported public int getSkipCount()Description copied from class:TestResultGets the total number of skipped tests.- Overrides:
getSkipCountin classTestResult- Returns:
- the total number of skipped tests.
-
add
-
tally
public void tally()Recount my children.- Overrides:
tallyin classTestResult
-
getClassName
-
compareTo
- Specified by:
compareToin interfaceComparable<ClassResult>
-
equals
-
hashCode
public int hashCode() -
getDisplayName
- Specified by:
getDisplayNamein interfaceModelObject
-
getFullName
Description copied from class:TestObjectGets the full name of this object.- Overrides:
getFullNamein classTestObject- Returns:
- the full name of this object.
- Since:
- 1.515
-
getFullDisplayName
- Overrides:
getFullDisplayNamein classTestObject
-
getRelativePathFrom
Gets the relative path to this test case from the given object.- Overrides:
getRelativePathFromin classTestObject- Parameters:
it- Target test object.- Returns:
- A relative path to this object, potentially from the top of the Hudson object model
-
setStartTime
public void setStartTime(long start)
-