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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(CaseResult r) intcompareTo(PackageResult that) booleanFind the test result corresponding to the one identified byidwithin 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) 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.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().intGets 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.intGets the total number of skipped tests.Gets the "children" of this test result that were skippedlonggetTitle()Gets the human readable title of this result object.booleanWhether this test result has children.inthashCode()booleanisPassed()voidsetStartTime(long time) voidtally()Recount my childrenMethods inherited from class hudson.tasks.test.TabulatedResult
blockToTestResult, getPipelineBlockWithTests, hasMultipleBlocks, populateBlocksMethods inherited from class hudson.tasks.test.TestResult
annotate, getBuildResult, getErrorDetails, getErrorStackTrace, getFailedSince, getFailedSinceRun, getFlakyFailures, getParentAction, getPreviousResult, getProperties, getRerunFailures, getResultInRun, getStderr, getStdout, setParent, setParentAction, toPrettyStringMethods 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, 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
-
PackageResult
-
-
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.
-
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.
-
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.
-
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.
-
getDynamic
public Object getDynamic(String name, org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) - Overrides:
getDynamicin classTestObject
-
getClassResult
-
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()Whether this test result has children.- Specified by:
hasChildrenin classTabulatedResult
-
getFailedTests
Returns a list of the failed cases, in no particular sort order- Specified by:
getFailedTestsin 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:
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()- Overrides:
isPassedin 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:
tallyin classTestResult
-
compareTo
- Specified by:
compareToin interfaceComparable<PackageResult>
-
equals
-
hashCode
public int hashCode() -
getDisplayName
- Specified by:
getDisplayNamein interfaceModelObject
-
setStartTime
public void setStartTime(long time)
-