Package hudson.plugins.robot.model
Class RobotTestObject
java.lang.Object
hudson.model.AbstractModelObject
hudson.plugins.robot.model.RobotTestObject
- All Implemented Interfaces:
ModelObject
,SearchableModelObject
,SearchItem
,Serializable
- Direct Known Subclasses:
RobotCaseResult
,RobotResult
,RobotSuiteResult
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
doDurationGraph
(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Return duration graph of the case in the request.void
doGraph
(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Return robot trend graph in the request.abstract long
abstract long
abstract String
long
Get duration of this testobject rungetDurationDiff
(RobotTestObject comparable) Get difference in of duration to given test objectabstract int
boolean
boolean
Wrapper for calling formatting from jellygetId()
abstract String
getName()
protected String
The name format used in case hashmap was changed in commit 59c8eec3e16f28baf1288848fccbac228bbe4748, July 2013.Run<?,
?> getOwner()
Return the build that this result belongs to.abstract RobotTestObject
abstract int
abstract RobotTestObject
getRelativeId
(RobotTestObject thisObject) Get path in tree relative to given TestObjectgetRelativePackageName
(RobotTestObject thisObject) Generates the full packagenamegetRelativeParent
(RobotTestObject thisObject) getResultInBuild
(AbstractBuild<?, ?> build) Get the corresponding result object from a given buildabstract int
protected boolean
isNeedToGenerate
(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Figure out if there's been changes since last request.void
setDuplicateSafeName
(String name) void
void
setLogFile
(String logFileName) void
setParentAction
(RobotBuildAction parentAction) void
setReportFile
(String reportFileName) Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface hudson.model.ModelObject
getDisplayName
Methods inherited from interface hudson.search.SearchItem
getSearchUrl
-
Field Details
-
duration
protected transient long duration
-
-
Constructor Details
-
RobotTestObject
public RobotTestObject()
-
-
Method Details
-
getParentAction
-
setParentAction
-
getName
-
getDescription
-
getParent
-
getId
-
setId
-
getLogFile
-
setLogFile
-
getReportFile
-
setReportFile
-
getHasLog
public boolean getHasLog() -
getHasReport
public boolean getHasReport() -
getRelativePackageName
Generates the full packagename- Parameters:
thisObject
- Robot test object- Returns:
- package name
-
getRelativeParent
-
getRelativeId
Get path in tree relative to given TestObject- Parameters:
thisObject
- The wanted testobject- Returns:
- Path to TestObject
-
urlEncode
-
getOwner
Return the build that this result belongs to.- Returns:
- Build object. Null if no build.
-
getResultInBuild
Get the corresponding result object from a given build- Parameters:
build
- The Jenkins build- Returns:
- TestObject for given build
-
getDuplicateSafeName
-
setDuplicateSafeName
-
getOldFormatName
The name format used in case hashmap was changed in commit 59c8eec3e16f28baf1288848fccbac228bbe4748, July 2013. This method allows accessing the tests from old saved results. TODO: Remove this after a year or so?- Returns:
- Name in old format
-
isNeedToGenerate
protected boolean isNeedToGenerate(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException Figure out if there's been changes since last request.- Parameters:
req
- StaplerRequestrsp
- StaplerResponse- Returns:
- true if modified, false otherwise
- Throws:
IOException
- thrown exception
-
getDuration
public long getDuration()Get duration of this testobject run- Returns:
- Duration of this testobject run
-
getHumanReadableDuration
Wrapper for calling formatting from jelly- Returns:
- Duration in human readable form
-
getDurationDiff
Get difference in of duration to given test object- Parameters:
comparable
- another testobject which to compare to- Returns:
- time difference in human readable format
-
getPreviousResult
-
getFailed
public abstract int getFailed() -
getPassed
public abstract int getPassed() -
getSkipped
public abstract int getSkipped() -
getCriticalPassed
public abstract long getCriticalPassed() -
getCriticalFailed
public abstract long getCriticalFailed() -
doGraph
public void doGraph(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException Return robot trend graph in the request.- Parameters:
req
- StaplerRequestrsp
- StaplerResponse- Throws:
IOException
- thrown exception
-
doDurationGraph
public void doDurationGraph(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException Return duration graph of the case in the request.- Parameters:
req
- StaplerRequestrsp
- StaplerResponse- Throws:
IOException
- thrown exception
-