hudson.plugins.robot.model
Class RobotTestObject

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.plugins.robot.model.RobotTestObject
All Implemented Interfaces:
hudson.model.ModelObject, hudson.search.SearchableModelObject, hudson.search.SearchItem, Serializable
Direct Known Subclasses:
RobotCaseResult, RobotResult, RobotSuiteResult

public abstract class RobotTestObject
extends hudson.model.AbstractModelObject
implements Serializable

See Also:
Serialized Form

Field Summary
protected  long duration
           
 
Constructor Summary
RobotTestObject()
           
 
Method Summary
 String getDuplicateSafeName()
           
 long getDuration()
          Get duration of this testobject run
 String getDurationDiff(RobotTestObject comparable)
          Get difference in of duration to given test object
abstract  int getFailed()
           
 String getHumanReadableDuration()
          Wrapper for calling formatting from jelly
abstract  String getName()
           
protected  String getOldFormatName()
          The name format used in case hashmap was changed in commit 59c8eec3e16f28baf1288848fccbac228bbe4748, July 2013.
 hudson.model.AbstractBuild<?,?> getOwner()
          Return the build that this result belongs to.
abstract  RobotTestObject getParent()
           
 RobotBuildAction getParentAction()
           
abstract  int getPassed()
           
abstract  RobotTestObject getPreviousResult()
           
 String getRelativeId(RobotTestObject thisObject)
          Get path in tree relative to given TestObject
 String getRelativePackageName(RobotTestObject thisObject)
          Generates the full packagename
 RobotTestObject getResultInBuild(hudson.model.AbstractBuild<?,?> build)
          Get the corresponding result object from a given build
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 setParentAction(RobotBuildAction parentAction)
           
 String urlDecode(String name)
           
 String urlEncode(String name)
           
 
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 Detail

duration

protected transient long duration
Constructor Detail

RobotTestObject

public RobotTestObject()
Method Detail

getParentAction

public RobotBuildAction getParentAction()

setParentAction

public void setParentAction(RobotBuildAction parentAction)

getName

public abstract String getName()

getParent

public abstract RobotTestObject getParent()

getRelativePackageName

public String getRelativePackageName(RobotTestObject thisObject)
Generates the full packagename

Returns:

getRelativeId

public String getRelativeId(RobotTestObject thisObject)
Get path in tree relative to given TestObject

Returns:

urlEncode

public String urlEncode(String name)

urlDecode

public String urlDecode(String name)

getOwner

public hudson.model.AbstractBuild<?,?> getOwner()
Return the build that this result belongs to.

Returns:
Build object. Null if no build.

getResultInBuild

public RobotTestObject getResultInBuild(hudson.model.AbstractBuild<?,?> build)
Get the corresponding result object from a given build

Parameters:
build -
Returns:

getDuplicateSafeName

public String getDuplicateSafeName()

setDuplicateSafeName

public void setDuplicateSafeName(String name)

getOldFormatName

protected String 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?


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 -
rsp -
Returns:
Throws:
IOException

getDuration

public long getDuration()
Get duration of this testobject run

Returns:

getHumanReadableDuration

public String getHumanReadableDuration()
Wrapper for calling formatting from jelly

Returns:

getDurationDiff

public String getDurationDiff(RobotTestObject comparable)
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

public abstract RobotTestObject getPreviousResult()

getFailed

public abstract int getFailed()

getPassed

public abstract int getPassed()


Copyright © 2004-2013. All Rights Reserved.