Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-67683

Add a build's test cases to REST API response

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor Minor
    • robot-plugin
    • Robot Framework plugin 3.0.1
    • 3.2

      Currently the Robot Framework plugin REST API returns a response for the RobotResult model

      {
      criticalFailed:
      criticalPassed:
      criticalTotal:
      executedSuites:
      failedCases: [] 
      overallFailed: 
      overallPassed: 
      overallSkipped: 
      overallTotal: 
      passPercentage: 
      skipPercentage: 
      timestamp:
      }

       

      It would be useful for the response to include

      passedCases: []
      skippedCases: []

       

      The failedCases is obtained from the RobotResult.getAllFailedCases() method, which returns List<RobotCaseResult>, which is iterated through and the RobotCaseResult.getName() and RobotCaseResult.getParent() methods are used to create the List<String> failedCases

       

      The RobotResult.getAllCases() also returns List<RobotCaseResult> and similarly, the List<String> passedCases and List<String> skippedCases could be created with the getName() + getParent().

      Each RobotCaseResult would be checked with .isPassed() or isSkipped() for their respective List<String>

      The last work done for the failedCases value https://github.com/jenkinsci/robot-plugin/pull/24/files#diff-a4d1d7fb1980ff4c5825099d9be03cd49f2fd1bcf5f8621926764468315064c2

            aleksisimell Aleksi Simell
            laurenyjj Lauren Jin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: