Class RobotResult

    • Constructor Detail

      • RobotResult

        public RobotResult()
    • Method Detail

      • 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
      • getCriticalPassed

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

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

        @Exported
        public long getCriticalTotal()
        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'
      • 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 onlyCritical)
        Returns pass percentage of passed tests per total tests.
        Parameters:
        onlyCritical - true if only critical tests are to be calculated
        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
      • 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
      • getDuration

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

        public Api getApi()