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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(CaseResult r) int
compareTo
(ClassResult that) boolean
Find the test result corresponding to the one identified byid
within 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".float
Time it took to run this test.getDynamic
(String name, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) int
Gets the total number of failed tests.Gets the full name of this object.getName()
Gets the name of this object.Reverse pointer ofTabulatedResult.getChildren()
.int
Gets the total number of passed tests.Gets the counter part of thisTestResult
in 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.int
Gets the total number of skipped tests.long
getTitle()
Gets the human readable title of this result object.boolean
int
hashCode()
void
setStartTime
(long start) void
tally()
Recount my children.Methods inherited from class hudson.tasks.test.TabulatedResult
blockToTestResult, getPipelineBlockWithTests, hasMultipleBlocks, populateBlocks
Methods inherited from class hudson.tasks.test.TestResult
annotate, getBuildResult, getErrorDetails, getErrorStackTrace, getFailedSince, getFailedSinceRun, getFailedTests, getParentAction, getPassedTests, getProperties, getResultInRun, getSkippedTests, getStderr, getStdout, isPassed, setParent, setParentAction, toPrettyString
Methods inherited from class hudson.tasks.test.TestObject
doSubmitDescription, getApi, getDescription, getDurationString, getHistory, getId, getResultInBuild, getSearchUrl, getTestAction, getTestActions, getTestResult, getTestResultAction, getTopLevelTestResult, getTotalCount, getUrl, safe, setDescription, uniquifyName
Methods inherited from class hudson.tasks.junit.TestObject
getOwner
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
-
Constructor Details
-
ClassResult
-
-
Method Details
-
getRun
- Overrides:
getRun
in classTestObject
- Returns:
- the run in which this test was executed.
-
getParent
Description copied from class:TestObject
Reverse pointer ofTabulatedResult.getChildren()
.- Specified by:
getParent
in classTestObject
- Returns:
- the parent
TestObject
.
-
getPreviousResult
Description copied from class:TestResult
Gets the counter part of thisTestResult
in the previous run.- Overrides:
getPreviousResult
in classTestResult
- Returns:
- null if no such counter part exists.
-
findCorrespondingResult
Description copied from class:TestObject
Find the test result corresponding to the one identified byid
within this test result.- Specified by:
findCorrespondingResult
in 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:TestResult
Gets the human readable title of this result object.- Overrides:
getTitle
in classTestResult
- Returns:
- the human readable title of this result object.
-
getChildTitle
- Overrides:
getChildTitle
in classTabulatedResult
-
getChildType
Description copied from class:TabulatedResult
Get a simple name for the type of children theTabulatedResult.getChildren()
method returns, for example "case", "class" or "package".- Overrides:
getChildType
in classTabulatedResult
- Returns:
- the type of children this result has, all lowercase.
-
getName
Description copied from class:TestObject
Gets the name of this object.- Overrides:
getName
in classTestObject
- Returns:
- the name of this object.
-
getSafeName
Description copied from class:TestObject
Gets the version ofTestObject.getName()
that's URL-safe.- Overrides:
getSafeName
in classTestObject
- Returns:
- the URL-safe name of this object.
-
getCaseResult
-
getDynamic
public Object getDynamic(String name, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) - Overrides:
getDynamic
in classTestObject
-
getChildren
Description copied from class:TabulatedResult
Gets the child test result objects.- Specified by:
getChildren
in classTabulatedResult
- Returns:
- the child test result objects.
- See Also:
-
hasChildren
public boolean hasChildren()- Specified by:
hasChildren
in classTabulatedResult
-
getDuration
public float getDuration()Description copied from class:TestResult
Time it took to run this test. In seconds.- Overrides:
getDuration
in classTestResult
- Returns:
- the time in seconds the test ran.
-
getStartTime
public long getStartTime() -
getPassCount
@Exported public int getPassCount()Description copied from class:TestResult
Gets the total number of passed tests.- Overrides:
getPassCount
in classTestResult
- Returns:
- the total number of passed tests.
-
getFailCount
@Exported public int getFailCount()Description copied from class:TestResult
Gets the total number of failed tests.- Overrides:
getFailCount
in classTestResult
- Returns:
- the total number of failed tests.
-
getSkipCount
@Exported public int getSkipCount()Description copied from class:TestResult
Gets the total number of skipped tests.- Overrides:
getSkipCount
in classTestResult
- Returns:
- the total number of skipped tests.
-
add
-
tally
public void tally()Recount my children.- Overrides:
tally
in classTestResult
-
getClassName
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ClassResult>
-
equals
-
hashCode
public int hashCode() -
getDisplayName
- Specified by:
getDisplayName
in interfaceModelObject
-
getFullName
Description copied from class:TestObject
Gets the full name of this object.- Overrides:
getFullName
in classTestObject
- Returns:
- the full name of this object.
- Since:
- 1.515
-
getFullDisplayName
- Overrides:
getFullDisplayName
in classTestObject
-
getRelativePathFrom
Gets the relative path to this test case from the given object.- Overrides:
getRelativePathFrom
in 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)
-