Package hudson.plugins.testng.results
Class MethodResult
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.MethodResult
- All Implemented Interfaces:
ModelObject,SearchableModelObject,SearchItem,Serializable
Handles result pertaining to a single test method
- See Also:
-
Field Summary
Fields inherited from class hudson.plugins.testng.results.BaseResult
name, parent, runFields inherited from class hudson.tasks.test.TabulatedResult
testsByBlock -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoGraph(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Creates test method execution history graph.voiddoGraphMap(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Creates map to make the graph click-ablehudson.tasks.test.TestResultCollection<? extends hudson.tasks.test.TestResult>Added only to expose class name as part of method result via .../api/xxxUsed to give different color based on test statusfloatCan't change this to return seconds as expected byTestObjectbecause it has already been exportedlongIf there was an error or a failure, this is the text from the message.Added only to expose possible exception via .../api/xxxlongbooleanbooleanisConfig()voidsetException(MethodResultException exception) voidvoidsetParameters(List<String> parameters) voidsetReporterOutput(String reporterOutput) voidsetTestUuid(String testUuid) Methods inherited from class hudson.plugins.testng.results.BaseResult
getAge, getDisplayName, getDynamic, getName, getParent, getParentAction, getRun, getTestResultAction, getTitle, getUpUrl, setParent, setRunMethods inherited from class hudson.tasks.test.TabulatedResult
blockToTestResult, getChildTitle, getChildType, getPipelineBlockWithTests, hasMultipleBlocks, populateBlocksMethods inherited from class hudson.tasks.test.TestResult
annotate, getBuildResult, getFailCount, getFailedSince, getFailedSinceRun, getFailedTests, getPassCount, getPassedTests, getPreviousResult, getProperties, getResultInRun, getSkipCount, getSkippedTests, getStderr, getStdout, isPassed, setParent, setParentAction, tally, toPrettyStringMethods inherited from class hudson.tasks.test.TestObject
doSubmitDescription, getApi, getDurationString, getFullDisplayName, getFullName, getHistory, getId, getRelativePathFrom, getResultInBuild, getSearchUrl, getTestAction, getTestActions, getTestResult, 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, sendError
-
Constructor Details
-
MethodResult
-
-
Method Details
-
setTestUuid
-
getParentTestName
- Returns:
- name of the
<test>tag that this method is part of
-
getParentSuiteName
- Returns:
- name of the suite this method is part of
-
getTestRunId
-
getStartedAt
-
getStartTime
public long getStartTime() -
getEndTime
public long getEndTime() -
getException
-
setException
-
getSafeName
- Overrides:
getSafeNamein classhudson.tasks.test.TestObject
-
findCorrespondingResult
- Overrides:
findCorrespondingResultin classBaseResult
-
getDuration
@Exported public float getDuration()Can't change this to return seconds as expected byTestObjectbecause it has already been exported- Overrides:
getDurationin classhudson.tasks.test.TestResult- Returns:
- duration in milliseconds
-
getStatus
-
getDescription
- Overrides:
getDescriptionin classhudson.tasks.test.TestObject
-
getGroups
-
getParameters
-
getErrorStackTrace
Added only to expose possible exception via .../api/xxx- Overrides:
getErrorStackTracein classhudson.tasks.test.TestResult- Returns:
- String representation of the exception
-
getErrorDetails
If there was an error or a failure, this is the text from the message.- Overrides:
getErrorDetailsin classhudson.tasks.test.TestResult
-
getClassName
Added only to expose class name as part of method result via .../api/xxx- Returns:
- String representation of the exception
-
setGroups
-
setParameters
-
isConfig
public boolean isConfig() -
doGraph
@POST public void doGraph(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException Creates test method execution history graph.- Parameters:
req- requestrsp- response- Throws:
IOException- on IO error
-
doGraphMap
@POST public void doGraphMap(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException Creates map to make the graph click-able- Parameters:
req- requestrsp- response- Throws:
IOException- on IO error
-
getCssClass
Used to give different color based on test status- Returns:
- css class based on result status
-
setReporterOutput
-
getReporterOutput
- Returns:
- reporter output
-
getChildren
- Specified by:
getChildrenin classhudson.tasks.test.TabulatedResult
-
hasChildren
public boolean hasChildren()- Specified by:
hasChildrenin classhudson.tasks.test.TabulatedResult
-