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
public class PackageResult extends BaseResult
Handles package level results- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_EXEC_MTHD_LIST_SIZE
static String
NO_PKG_NAME
-
Fields inherited from class hudson.plugins.testng.results.BaseResult
name, parent, run
-
-
Constructor Summary
Constructors Constructor Description PackageResult(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAllSortedTestMethodsByStartTime()
Gets table row representation for all the method results associated with this package (sorted based on start time)List<ClassResult>
getChildren()
float
getDuration()
Can't change this to return seconds as expected byTestObject
because it has already been exportedObject
getDynamic(String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
long
getEndTime()
int
getFailCount()
String
getFirstXSortedTestMethodsByStartTime()
Gets table row representation for the firstMAX_EXEC_MTHD_LIST_SIZE
method results associated with this package (sorted based on start time)int
getPassCount()
int
getSkipCount()
List<MethodResult>
getSortedTestMethodsByStartTime()
Gets all the method results related to this package sorted by the time the methods were executedlong
getStartTime()
int
getTotalCount()
boolean
hasChildren()
void
setRun(Run<?,?> run)
void
sortTestMethods()
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.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
-
-
-
-
Field Detail
-
NO_PKG_NAME
public static final String NO_PKG_NAME
- See Also:
- Constant Field Values
-
MAX_EXEC_MTHD_LIST_SIZE
public static final int MAX_EXEC_MTHD_LIST_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PackageResult
public PackageResult(String name)
-
-
Method Detail
-
setRun
public void setRun(Run<?,?> run)
- 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
public List<MethodResult> 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
@JavaScriptMethod public String 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
@JavaScriptMethod public String 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
@Exported(name="classs") public List<ClassResult> 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.StaplerRequest req, org.kohsuke.stapler.StaplerResponse 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
-
-