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, run
Fields inherited from class hudson.tasks.test.TabulatedResult
testsByBlock
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
doGraph
(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Creates test method execution history graph.void
doGraphMap
(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Creates map to make the graph click-ablehudson.tasks.test.TestResult
Collection<? 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 statusfloat
Can't change this to return seconds as expected byTestObject
because it has already been exportedlong
If there was an error or a failure, this is the text from the message.Added only to expose possible exception via .../api/xxxlong
boolean
boolean
isConfig()
void
setException
(MethodResultException exception) void
void
setParameters
(List<String> parameters) void
setReporterOutput
(String reporterOutput) void
setTestUuid
(String testUuid) Methods inherited from class hudson.plugins.testng.results.BaseResult
getAge, getDisplayName, getDynamic, getName, getParent, getParentAction, getRun, getTestResultAction, getTitle, getUpUrl, setParent, setRun
Methods inherited from class hudson.tasks.test.TabulatedResult
blockToTestResult, getChildTitle, getChildType, getPipelineBlockWithTests, hasMultipleBlocks, populateBlocks
Methods 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, toPrettyString
Methods 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, 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
-
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:
getSafeName
in classhudson.tasks.test.TestObject
-
findCorrespondingResult
- Overrides:
findCorrespondingResult
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
-
getStatus
-
getDescription
- Overrides:
getDescription
in classhudson.tasks.test.TestObject
-
getGroups
-
getParameters
-
getErrorStackTrace
Added only to expose possible exception via .../api/xxx- Overrides:
getErrorStackTrace
in 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:
getErrorDetails
in 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:
getChildren
in classhudson.tasks.test.TabulatedResult
-
hasChildren
public boolean hasChildren()- Specified by:
hasChildren
in classhudson.tasks.test.TabulatedResult
-