Class RobotResult

All Implemented Interfaces:
ModelObject, SearchableModelObject, SearchItem, Serializable
Direct Known Subclasses:
AggregatedRobotAction.AggregatedRobotResult

@ExportedBean public class RobotResult extends RobotTestObject
Class representing Robot Framework test results.
See Also:
  • Constructor Details

    • RobotResult

      public RobotResult()
  • Method Details

    • findObjectById

      public RobotTestObject findObjectById(String id)
      Find a testobject in the result tree with id-path
      Parameters:
      id - path e.g. "suite/subsuite/testcase"
      Returns:
      null if not found
    • getName

      public String getName()
      Specified by:
      getName in class RobotTestObject
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in class RobotTestObject
    • getCriticalPassed

      @Deprecated @Exported public long getCriticalPassed()
      Deprecated.
      Get number of passed critical tests.
      Specified by:
      getCriticalPassed in class RobotTestObject
      Returns:
      number of passed critical tests
    • getCriticalFailed

      @Deprecated @Exported public long getCriticalFailed()
      Deprecated.
      Get number of failed critical tests.
      Specified by:
      getCriticalFailed in class RobotTestObject
      Returns:
      number of failed critical tests
    • getCriticalTotal

      @Deprecated @Exported public long getCriticalTotal()
      Deprecated.
      Get total number of critical tests.
      Returns:
      total number of critical tests
    • getOverallPassed

      @Exported public long getOverallPassed()
      Get number of all passed tests.
      Returns:
      number of all passed tests
    • getOverallFailed

      @Exported public long getOverallFailed()
      Get number of all failed tests.
      Returns:
      number of all failed tests
    • getOverallSkipped

      @Exported public long getOverallSkipped()
      Get number of all skipped tests.
      Returns:
      number of all skipped tests
    • getOverallTotal

      @Exported public long getOverallTotal()
      Get number of all tests.
      Returns:
      number of all tests
    • getStatsByCategory

      public List<RobotResultStatistics> getStatsByCategory()
      Get pass/fail stats by category.
      Returns:
      List containing 'critical tests' and 'all tests'
    • setStatsByCategory

      public void setStatsByCategory(List<RobotResultStatistics> statsByCategory)
    • getTimeStamp

      @Exported public String getTimeStamp()
      Get the timestamp of the original test run.
      Returns:
      timestamp of the original test run
    • setTimeStamp

      public void setTimeStamp(String timeStamp)
      Set the timestamp of test run.
      Parameters:
      timeStamp - The wanted timestamp.
    • getPassPercentage

      public double getPassPercentage(boolean countSkipped)
      Returns pass percentage of passed tests per total tests.
      Parameters:
      countSkipped - true if skipped tests should be included in calculating total tests
      Returns:
      Percentage value rounded to 1 decimal
    • getPassPercentage

      @Exported public double getPassPercentage()
    • getSkipPercentage

      @Exported public double getSkipPercentage()
    • getDisplayName

      public String getDisplayName()
      }
    • getSearchUrl

      public String getSearchUrl()
    • getSuite

      public RobotSuiteResult getSuite(String name)
      Get top level suite by name
      Parameters:
      name - suite name
      Returns:
      suite result, null when not found
    • addSuite

      public void addSuite(RobotSuiteResult suite)
      Add a suite to this result. If suite with same name exists, store this with sequential numbering
      Parameters:
      suite - RobotSuiteResult to add
    • getSuites

      public Collection<RobotSuiteResult> getSuites()
      Get all top level suites
      Returns:
      Collection of suiteresults
    • getExecutedSuites

      @Exported public List<String> getExecutedSuites()
    • getAllSuites

      public List<RobotSuiteResult> getAllSuites()
      Get all testsuites related to result.
      Returns:
      List of suiteresults
    • getAllFailedCases

      public List<RobotCaseResult> getAllFailedCases()
      Get all failed test cases related to result.
      Returns:
      list of test case results
    • getAllPassedCases

      public List<RobotCaseResult> getAllPassedCases()
      Get all passed test cases related to result.
      Returns:
      list of test case results
    • getAllSkippedCases

      public List<RobotCaseResult> getAllSkippedCases()
      Get all skipped test cases related to result.
      Returns:
      list of test case results
    • getFailedCases

      @Exported public List<String> getFailedCases()
      Get all failed test case names related to result.
      Returns:
      list of test case names as strings
    • getPassedCases

      @Exported public List<String> getPassedCases()
      Get all passed test case names related to result.
      Returns:
      list of test case names as strings
    • getSkippedCases

      @Exported public List<String> getSkippedCases()
      Get all skipped test case names related to result.
      Returns:
      list of test case names as strings
    • tally

      public void tally(RobotBuildAction robotBuildAction)
      Count the totals in result tree and assign parent action.
      Parameters:
      robotBuildAction - The action to be used as the base
    • getDynamic

      public Object getDynamic(String token, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
      Return the object represented by url-string
      Parameters:
      token - Token
      req - StaplerRequest
      rsp - StaplerResponse
      Returns:
      object represented by url-string
    • doReport

      public DirectoryBrowserSupport doReport(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, InterruptedException
      Serves Robot html report via robot url. Shows not found page if file is missing. If reportfilename is specified, the report is served (To be compatible with v1.0 builds)
      Parameters:
      req - StaplerRequest
      rsp - StaplerResponse
      Returns:
      DirectoryBrowserSupport for the report or null
      Throws:
      IOException - thrown exception
      javax.servlet.ServletException - thrown exception
      InterruptedException - thrown exception
    • getParent

      public RobotTestObject getParent()
      Specified by:
      getParent in class RobotTestObject
    • getDuration

      public long getDuration()
      Get the total duration of the test run
      Overrides:
      getDuration in class RobotTestObject
      Returns:
      duration
    • getPreviousResult

      public RobotResult getPreviousResult()
      Specified by:
      getPreviousResult in class RobotTestObject
    • getFailed

      public int getFailed()
      Specified by:
      getFailed in class RobotTestObject
    • getPassed

      public int getPassed()
      Specified by:
      getPassed in class RobotTestObject
    • getSkipped

      public int getSkipped()
      Specified by:
      getSkipped in class RobotTestObject
    • getApi

      public Api getApi()
    • getAllCases

      public List<RobotCaseResult> getAllCases()