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

Failing to parse pabot generated output.xml with Robot Framework 7.0

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • robot-plugin
    • None

      When running Robot Framework plugin 3.5.0 with pabot, it fails to parse the output.xml and gives the following error:

      Also:   org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 392fd72f-5164-49c5-a9d4-11eacbe0a368
      java.lang.NullPointerException: Cannot invoke "String.length()" because "text" is null
      	at java.base/java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1474)
      	at java.base/java.text.DateFormat.parse(DateFormat.java:397)
      	at hudson.plugins.robot.model.RobotCaseResult.timeDifference(RobotCaseResult.java:68)
      	at hudson.plugins.robot.model.RobotCaseResult.getDuration(RobotCaseResult.java:117)
      	at hudson.plugins.robot.model.RobotSuiteResult.tally(RobotSuiteResult.java:405)
      	at hudson.plugins.robot.model.RobotSuiteResult.tally(RobotSuiteResult.java:413)
      	at hudson.plugins.robot.model.RobotSuiteResult.tally(RobotSuiteResult.java:413)
      	at hudson.plugins.robot.model.RobotResult.tally(RobotResult.java:422)
      	at hudson.plugins.robot.RobotBuildAction.setResult(RobotBuildAction.java:124)
      	at hudson.plugins.robot.RobotBuildAction.<init>(RobotBuildAction.java:95)
      	at hudson.plugins.robot.RobotPublisher.perform(RobotPublisher.java:299)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      	at java.base/java.lang.Thread.run(Thread.java:833)
      Finished: FAILURE
      

      It's trying to parse the endtime attribute from the output.xml, but that attribute was removed in Robot Framework 7.0.

          [JENKINS-72582] Failing to parse pabot generated output.xml with Robot Framework 7.0

          Pavan created issue -
          Pavan made changes -
          Description New: using in docker based jenkins

          Aleksi Simell added a comment -

          How is this related to Robot Framework plugin? What are you trying to do?

          Aleksi Simell added a comment - How is this related to Robot Framework plugin? What are you trying to do?
          Mark Waite made changes -
          Component/s New: pipeline [ 21692 ]
          Component/s Original: robot-plugin [ 15773 ]

          Mark Waite added a comment -

          pavans thanks reporting the issue. We are grateful when a user reports a problem.

          You'll need to provide much more information in order to persuade others to volunteer their time to investigate the issue. The "How to report an issue" page lists the types of details that are needed so that others can investigate an issue. If that information is not provided, this will likely be closed as "Cannot reproduce".

          Mark Waite added a comment - pavans thanks reporting the issue. We are grateful when a user reports a problem. You'll need to provide much more information in order to persuade others to volunteer their time to investigate the issue. The "How to report an issue" page lists the types of details that are needed so that others can investigate an issue. If that information is not provided, this will likely be closed as "Cannot reproduce".

          Pavan added a comment -

          Hi aleksisimell actually I'm getting this error while trying to publish the robot test results to the jenkins Dashboard. I got this exception while assigning the robot results to the build after parsing the results file. 

          Pavan added a comment - Hi aleksisimell actually I'm getting this error while trying to publish the robot test results to the jenkins Dashboard. I got this exception while assigning the robot results to the build after parsing the results file. 

          Pavan added a comment -

          Hi aleksisimell actually I'm getting this error while trying to publish the robot test results to the jenkins Dashboard. I got this exception while assigning the robot results to the build after parsing the results file. 

          Pavan added a comment - Hi aleksisimell actually I'm getting this error while trying to publish the robot test results to the jenkins Dashboard. I got this exception while assigning the robot results to the build after parsing the results file. 
          Mark Waite made changes -
          Component/s New: robot-plugin [ 15773 ]
          Component/s Original: pipeline [ 21692 ]

          Aleksi Simell added a comment -

          What versions of the plugin, Robot Framework, and Jenkins are you using? And what does your pipeline look like?

          I can't really even begin to investigate with this bug description as and markewaite said, without further information, I will have to close this ticket due to lacking information.

          Aleksi Simell added a comment - What versions of the plugin, Robot Framework, and Jenkins are you using? And what does your pipeline look like? I can't really even begin to investigate with this bug description as and markewaite said, without further information, I will have to close this ticket due to lacking information.

          Dani added a comment -

          Hi,

          I am facing the same issue while using robot plugin to publish the results. Let me provide more information.

          When the plugin is used:

           

          [Pipeline] End of Pipeline
          Also:   org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 392fd72f-5164-49c5-a9d4-11eacbe0a368
          java.lang.NullPointerException: Cannot invoke "String.length()" because "text" is null
          	at java.base/java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1474)
          	at java.base/java.text.DateFormat.parse(DateFormat.java:397)
          	at hudson.plugins.robot.model.RobotCaseResult.timeDifference(RobotCaseResult.java:68)
          	at hudson.plugins.robot.model.RobotCaseResult.getDuration(RobotCaseResult.java:117)
          	at hudson.plugins.robot.model.RobotSuiteResult.tally(RobotSuiteResult.java:405)
          	at hudson.plugins.robot.model.RobotSuiteResult.tally(RobotSuiteResult.java:413)
          	at hudson.plugins.robot.model.RobotSuiteResult.tally(RobotSuiteResult.java:413)
          	at hudson.plugins.robot.model.RobotResult.tally(RobotResult.java:422)
          	at hudson.plugins.robot.RobotBuildAction.setResult(RobotBuildAction.java:124)
          	at hudson.plugins.robot.RobotBuildAction.<init>(RobotBuildAction.java:95)
          	at hudson.plugins.robot.RobotPublisher.perform(RobotPublisher.java:299)
          	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101)
          	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71)
          	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
          	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
          	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
          	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
          	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
          	at java.base/java.lang.Thread.run(Thread.java:833)
          [Gitea] Notifying branch build status: FAILURE There was a failure building this commit
          [Gitea] Notified
          Finished: FAILURE

           

           

          When the plugin is not used:

           

          [Pipeline] End of Pipeline
          [Gitea] Notifying branch build status: SUCCESS This commit looks good
          [Gitea] Notified
          Finished: SUCCESS

           

           

          The versions:

          - Robot Framework version: 7.0

          • plugin version: 3.5.0
          • Jenkins version: 2.414.2

          Dani added a comment - Hi, I am facing the same issue while using robot plugin to publish the results. Let me provide more information. When the plugin is used:   [Pipeline] End of Pipeline Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 392fd72f-5164-49c5-a9d4-11eacbe0a368 java.lang.NullPointerException: Cannot invoke "String.length()" because "text" is null at java.base/java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1474) at java.base/java.text.DateFormat.parse(DateFormat.java:397) at hudson.plugins.robot.model.RobotCaseResult.timeDifference(RobotCaseResult.java:68) at hudson.plugins.robot.model.RobotCaseResult.getDuration(RobotCaseResult.java:117) at hudson.plugins.robot.model.RobotSuiteResult.tally(RobotSuiteResult.java:405) at hudson.plugins.robot.model.RobotSuiteResult.tally(RobotSuiteResult.java:413) at hudson.plugins.robot.model.RobotSuiteResult.tally(RobotSuiteResult.java:413) at hudson.plugins.robot.model.RobotResult.tally(RobotResult.java:422) at hudson.plugins.robot.RobotBuildAction.setResult(RobotBuildAction.java:124) at hudson.plugins.robot.RobotBuildAction.<init>(RobotBuildAction.java:95) at hudson.plugins.robot.RobotPublisher.perform(RobotPublisher.java:299) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) [Gitea] Notifying branch build status: FAILURE There was a failure building this commit [Gitea] Notified Finished: FAILURE     When the plugin is not used:   [Pipeline] End of Pipeline [Gitea] Notifying branch build status: SUCCESS This commit looks good [Gitea] Notified Finished: SUCCESS     The versions: - Robot Framework version: 7.0 plugin version: 3.5.0 Jenkins version: 2.414.2

            aleksisimell Aleksi Simell
            pavans Pavan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: