Package hudson.plugins.testng.results
Class PackageResult
java.lang.Object
hudson.model.AbstractModelObject
hudson.tasks.junit.TestObject
hudson.tasks.test.TestObject
hudson.tasks.test.TestResult
hudson.tasks.test.TabulatedResult
hudson.plugins.testng.results.BaseResult
hudson.plugins.testng.results.PackageResult
- All Implemented Interfaces:
ModelObject
,SearchableModelObject
,SearchItem
,Serializable
Handles package level results
- See Also:
-
Field Summary
FieldsFields inherited from class hudson.plugins.testng.results.BaseResult
name, parent, run
Fields inherited from class hudson.tasks.test.TabulatedResult
testsByBlock
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets table row representation for all the method results associated with this package (sorted based on start time)float
Can't change this to return seconds as expected byTestObject
because it has already been exportedgetDynamic
(String token, org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) long
int
Gets table row representation for the firstMAX_EXEC_MTHD_LIST_SIZE
method results associated with this package (sorted based on start time)int
int
Gets all the method results related to this package sorted by the time the methods were executedlong
int
boolean
void
void
Sorts the test method results associated with this package based on the start time for method executionvoid
tally()
Methods inherited from class hudson.plugins.testng.results.BaseResult
findCorrespondingResult, getAge, getDisplayName, getName, getParent, getParentAction, getRun, getTestResultAction, getTitle, getUpUrl, setParent
Methods inherited from class hudson.tasks.test.TabulatedResult
blockToTestResult, getChildTitle, getChildType, getPipelineBlockWithTests, hasMultipleBlocks, populateBlocks
Methods inherited from class hudson.tasks.test.TestResult
annotate, getBuildResult, getErrorDetails, getErrorStackTrace, getFailedSince, getFailedSinceRun, getFailedTests, getPassedTests, getPreviousResult, getProperties, getResultInRun, getSkippedTests, getStderr, getStdout, isPassed, setParent, setParentAction, toPrettyString
Methods inherited from class hudson.tasks.test.TestObject
doSubmitDescription, getApi, getDescription, getDurationString, getFullDisplayName, getFullName, getHistory, getId, getRelativePathFrom, getResultInBuild, getSafeName, getSearchUrl, getTestAction, getTestActions, getTestResult, getTopLevelTestResult, 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, sendError, sendError, sendError
-
Field Details
-
NO_PKG_NAME
- See Also:
-
MAX_EXEC_MTHD_LIST_SIZE
public static final int MAX_EXEC_MTHD_LIST_SIZE- See Also:
-
-
Constructor Details
-
PackageResult
-
-
Method Details
-
setRun
- Overrides:
setRun
in classBaseResult
-
getDuration
@Exported public float getDuration()Can't change this to return seconds as expected byTestObject
because it has already been exported- Overrides:
getDuration
in classhudson.tasks.test.TestResult
- Returns:
- duration in milliseconds
-
getStartTime
public long getStartTime() -
getEndTime
public long getEndTime() -
getFailCount
@Exported(visibility=9, name="fail") public int getFailCount()- Overrides:
getFailCount
in classhudson.tasks.test.TestResult
-
getSkipCount
@Exported(visibility=9, name="skip") public int getSkipCount()- Overrides:
getSkipCount
in classhudson.tasks.test.TestResult
-
getTotalCount
@Exported(visibility=9) public int getTotalCount()- Overrides:
getTotalCount
in classhudson.tasks.test.TestObject
-
getPassCount
public int getPassCount()- Overrides:
getPassCount
in classhudson.tasks.test.TestResult
-
getSortedTestMethodsByStartTime
Gets all the method results related to this package sorted by the time the methods were executed- Returns:
- results sorted by start time
-
getAllSortedTestMethodsByStartTime
Gets table row representation for all the method results associated with this package (sorted based on start time)- Returns:
- test methods sorted by start time
-
getFirstXSortedTestMethodsByStartTime
Gets table row representation for the firstMAX_EXEC_MTHD_LIST_SIZE
method results associated with this package (sorted based on start time)- Returns:
- first page of test results sorted by start time
-
tally
public void tally()- Overrides:
tally
in classhudson.tasks.test.TestResult
-
sortTestMethods
public void sortTestMethods()Sorts the test method results associated with this package based on the start time for method execution -
getChildren
- Specified by:
getChildren
in classhudson.tasks.test.TabulatedResult
-
hasChildren
public boolean hasChildren()- Specified by:
hasChildren
in classhudson.tasks.test.TabulatedResult
-
getDynamic
public Object getDynamic(String token, org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Overriding so that we can be backward compatible with shared links. We changed name for classes to be simple name instead of canonical.
TODO: Added this in release 1.7. Delete this method in one of the next few release.
- Overrides:
getDynamic
in classBaseResult
- Parameters:
token
- fully qualified class name used to search for test resultsreq
- stapler request to search for test resultsrsp
- stapler response to search for test results- Returns:
- test result
-