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

public abstract class RobotTestObject extends AbstractModelObject implements Serializable
See Also:
  • Field Details

    • duration

      protected transient long duration
  • Constructor Details

    • RobotTestObject

      public RobotTestObject()
  • Method Details

    • getParentAction

      public RobotBuildAction getParentAction()
    • setParentAction

      public void setParentAction(RobotBuildAction parentAction)
    • getName

      public abstract String getName()
    • getDescription

      public abstract String getDescription()
    • getParent

      public abstract RobotTestObject getParent()
    • getId

      public String getId()
    • setId

      public void setId(String id)
    • getLogFile

      public String getLogFile()
    • setLogFile

      public void setLogFile(String logFileName)
    • getReportFile

      public String getReportFile()
    • setReportFile

      public void setReportFile(String reportFileName)
    • getHasLog

      public boolean getHasLog()
    • getHasReport

      public boolean getHasReport()
    • getRelativePackageName

      public String getRelativePackageName(RobotTestObject thisObject)
      Generates the full packagename
      Parameters:
      thisObject - Robot test object
      Returns:
      package name
    • getRelativeParent

      public String getRelativeParent(RobotTestObject thisObject)
    • getRelativeId

      public String getRelativeId(RobotTestObject thisObject)
      Get path in tree relative to given TestObject
      Parameters:
      thisObject - The wanted testobject
      Returns:
      Path to TestObject
    • urlEncode

      public String urlEncode(String name)
    • getOwner

      public Run<?,?> getOwner()
      Return the build that this result belongs to.
      Returns:
      Build object. Null if no build.
    • getResultInBuild

      public RobotTestObject getResultInBuild(AbstractBuild<?,?> build)
      Get the corresponding result object from a given build
      Parameters:
      build - The Jenkins build
      Returns:
      TestObject for given build
    • 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?
      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 - StaplerRequest
      rsp - 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

      public String getHumanReadableDuration()
      Wrapper for calling formatting from jelly
      Returns:
      Duration in human readable form
    • 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()
    • 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 - StaplerRequest
      rsp - 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 - StaplerRequest
      rsp - StaplerResponse
      Throws:
      IOException - thrown exception