Package hudson.tasks.junit
Class PackageResult
- All Implemented Interfaces:
ModelObject
,SearchableModelObject
,SearchItem
,Serializable
,Comparable<PackageResult>
Cumulative test result for a package.
- 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
(PackageResult that) boolean
Find the test result corresponding to the one identified byid
within this test result.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".getClassResult
(String name) 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.Returns a list of the failed cases, in no particular sort orderReturns a list of the failed cases, sorted by age.getName()
Gets the name of this object.Reverse pointer ofTabulatedResult.getChildren()
.int
Gets the total number of passed tests.Gets the "children" of this test result that passedRun<?,
?> getRun()
Gets the version ofTestObject.getName()
that's URL-safe.int
Gets the total number of skipped tests.Gets the "children" of this test result that were skippedlong
getTitle()
Gets the human readable title of this result object.boolean
Whether this test result has children.int
hashCode()
boolean
isPassed()
void
setStartTime
(long time) void
tally()
Recount my childrenMethods 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, getParentAction, getPreviousResult, getProperties, getResultInRun, getStderr, getStdout, setParent, setParentAction, toPrettyString
Methods inherited from class hudson.tasks.test.TestObject
doSubmitDescription, getApi, getDescription, getDurationString, getFullDisplayName, getFullName, getHistory, getId, getRelativePathFrom, 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
-
PackageResult
-
-
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
.
-
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.
-
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.
-
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.
-
getDynamic
public Object getDynamic(String name, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) - Overrides:
getDynamic
in classTestObject
-
getClassResult
-
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()Whether this test result has children.- Specified by:
hasChildren
in classTabulatedResult
-
getFailedTests
Returns a list of the failed cases, in no particular sort order- Specified by:
getFailedTests
in classMetaTabulatedResult
- Returns:
- the children of this test result, if any, or an empty collection
-
getFailedTestsSortedByAge
Returns a list of the failed cases, sorted by age.- Returns:
- a list of the failed cases, sorted by age.
-
getPassedTests
Gets the "children" of this test result that passed- Overrides:
getPassedTests
in 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:
getSkippedTests
in classTestResult
- Returns:
- the children of this test result, if any, or an empty list
-
isPassed
public boolean isPassed()- Overrides:
isPassed
in classTestResult
- Returns:
- true if every test was not skipped and every test did not fail, false otherwise.
-
add
-
tally
public void tally()Recount my children- Overrides:
tally
in classTestResult
-
compareTo
- Specified by:
compareTo
in interfaceComparable<PackageResult>
-
equals
-
hashCode
public int hashCode() -
getDisplayName
- Specified by:
getDisplayName
in interfaceModelObject
-
setStartTime
public void setStartTime(long time)
-