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

Junit output can't be parsed

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I am creating JUnit report XML files via fastlane for our iOS builds. But it looks like the XML file can't be parsed, I get the following error in the Jenkins web interface:

      Parsing of file '/Users/jenkins/workspace/timr_iOS_App_jenkins-updates/output/report.junit' failed due to an exception:
      java.util.NoSuchElementException: No value present
      	at java.base/java.util.Optional.get(Optional.java:148)
      	at se.bjurr.violations.lib.parsers.JUnitParser.parseReportOutput(JUnitParser.java:32)
      	at edu.hm.hafner.analysis.parser.violations.AbstractViolationAdapter.parse(AbstractViolationAdapter.java:33)
       [wrapped] edu.hm.hafner.analysis.ParsingException: Exception occurred during parsing
      NoSuchElementException: No value present
      java.util.NoSuchElementException: No value present
      	at java.base/java.util.Optional.get(Optional.java:148)
      	at se.bjurr.violations.lib.parsers.JUnitParser.parseReportOutput(JUnitParser.java:32)
      	at edu.hm.hafner.analysis.parser.violations.AbstractViolationAdapter.parse(AbstractViolationAdapter.java:33)
      	at io.jenkins.plugins.analysis.core.model.FilesScanner.aggregateIssuesOfFile(FilesScanner.java:105)
      	at io.jenkins.plugins.analysis.core.model.FilesScanner.scanFiles(FilesScanner.java:89)
      	at io.jenkins.plugins.analysis.core.model.FilesScanner.invoke(FilesScanner.java:72)
      	at io.jenkins.plugins.analysis.core.model.FilesScanner.invoke(FilesScanner.java:30)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3112)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      	at hudson.remoting.Request$2.run(Request.java:375)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:73)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      	at java.base/java.util.Optional.get(Optional.java:148)
      	at se.bjurr.violations.lib.parsers.JUnitParser.parseReportOutput(JUnitParser.java:32)
      	at edu.hm.hafner.analysis.parser.violations.AbstractViolationAdapter.parse(AbstractViolationAdapter.java:33)
      	at io.jenkins.plugins.analysis.core.model.FilesScanner.aggregateIssuesOfFile(FilesScanner.java:105)
      	at io.jenkins.plugins.analysis.core.model.FilesScanner.scanFiles(FilesScanner.java:89)
      	at io.jenkins.plugins.analysis.core.model.FilesScanner.invoke(FilesScanner.java:72)
      	at io.jenkins.plugins.analysis.core.model.FilesScanner.invoke(FilesScanner.java:30)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3112)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      	at hudson.remoting.Request$2.run(Request.java:375)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:73)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      	at edu.hm.hafner.analysis.parser.violations.AbstractViolationAdapter.parse(AbstractViolationAdapter.java:37)
      	at io.jenkins.plugins.analysis.core.model.FilesScanner.aggregateIssuesOfFile(FilesScanner.java:105)
      	at io.jenkins.plugins.analysis.core.model.FilesScanner.scanFiles(FilesScanner.java:89)
      	at io.jenkins.plugins.analysis.core.model.FilesScanner.invoke(FilesScanner.java:72)
      	at io.jenkins.plugins.analysis.core.model.FilesScanner.invoke(FilesScanner.java:30)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3112)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      	at hudson.remoting.Request$2.run(Request.java:375)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:73)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      

      I used the JUnit plugin previously and that worked without any problems, with the same junit XML file.

        Attachments

          Activity

          Hide
          drulli Ulli Hafner added a comment -

          Created a bug in the downstream library: https://github.com/tomasbjerre/violations-lib/issues/97

          Show
          drulli Ulli Hafner added a comment - Created a bug in the downstream library: https://github.com/tomasbjerre/violations-lib/issues/97
          Hide
          patrickst Patrick Steiner added a comment -

          If installed the latest version of the analysis-model-api-plugin 8.2.1

          This is the report file.
          report.junit

          Show
          patrickst Patrick Steiner added a comment - If installed the latest version of the analysis-model-api-plugin 8.2.1 This is the report file. report.junit
          Hide
          drulli Ulli Hafner added a comment -

          Which version of the analysis-model-api-plugin are you using? Can you please attach such a file?

          Show
          drulli Ulli Hafner added a comment - Which version of the analysis-model-api-plugin are you using? Can you please attach such a file?

            People

            Assignee:
            drulli Ulli Hafner
            Reporter:
            patrickst Patrick Steiner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: