GithubHelp home page GithubHelp logo

Generating a report out of an XML that has 0 test results throws a Null Pointer exception about bootstraped-multi-test-results-report-plugin HOT 8 CLOSED

jenkinsci avatar jenkinsci commented on July 20, 2024
Generating a report out of an XML that has 0 test results throws a Null Pointer exception

from bootstraped-multi-test-results-report-plugin.

Comments (8)

BogdanLivadariu avatar BogdanLivadariu commented on July 20, 2024

@onurgokkocabas can you attach the xml file/files ?

from bootstraped-multi-test-results-report-plugin.

onurgokkocabas avatar onurgokkocabas commented on July 20, 2024

NOTE: Github does not support XML files as attachments, so I changed the extension to txt, change it back to xml please.

postfix_rspec-results.txt

library used to convert to junit format was 'yarjuf' and run is made through Jenkins pipeline from the master node. it works in the cases where there is even a dummy test that passes as a workaround which I had to deal with.

And oh - great plugin !

from bootstraped-multi-test-results-report-plugin.

BogdanLivadariu avatar BogdanLivadariu commented on July 20, 2024

@onurgokkocabas if your test results are converted to junit, then you can use the junit reporter for them.

from how the results you uploaded look like, have you altered them in any way ? as it does not have any test there, is just a blank testsuite.

If you can share with me the rspec initial report files that would be awesome ... as I've never got my hands on one in a while
if you don't want to put it here you can email me [email protected]

from bootstraped-multi-test-results-report-plugin.

onurgokkocabas avatar onurgokkocabas commented on July 20, 2024

@BogdanLivadariu no, its ok, i'll just put it in here. that's exactly what the issue is though. Empty report throws an exception during parsing which should just generate N/A or something along those lines.
x.txt

i'm trying to run the same empty report with the JUnitTestReportBuilder now

from bootstraped-multi-test-results-report-plugin.

onurgokkocabas avatar onurgokkocabas commented on July 20, 2024

Similar odd issue with an empty test suite from JUnit Report too:

14:15:47 [JUnitReportPublisher] Compiling JUnit Html Reports ...
14:15:47 [JUnit test report builder] Copying XML files from: /var/lib/jenkins/workspace/-enable-rspec-tests-for-all-ZAUBXYGJI74CC4YHRMYSI4GQUJ4FR2BFVL4O5L4GAA32ANOTJIFA to reports directory: /var/lib/jenkins/jobs/CSLREW/jobs/blueprints/branches/CSLR-431-ena.darvcs.ests-for-all/builds/8/junit-reports-with-handlebars
14:15:47 [JUnitReportPublisher] Found 1 xml files.
14:15:47 [JUnit test report builder] 0. Found a xml file: postfix_rspec-results.xml
14:15:47 [JUnit test report builder] Generating HTML reports
14:15:47 processing: /var/lib/jenkins/jobs/CSLREW/jobs/blueprints/branches/CSLR-431-ena.darvcs.ests-for-all/builds/8/junit-reports-with-handlebars/xmlData/postfix_rspec-results.xml
14:15:47 [JUnit test report builder] there was an error generating the reports: javax.xml.bind.UnmarshalException
14:15:47  - with linked exception:
14:15:47 [org.xml.sax.SAXParseException; systemId: file:/var/lib/jenkins/jobs/CSLREW/jobs/blueprints/branches/CSLR-431-ena.darvcs.ests-for-all/builds/8/junit-reports-with-handlebars/xmlData/postfix_rspec-results.xml; lineNumber: 1; columnNumber: 1; Premature end of file.]
14:15:47 javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335)
14:15:47 com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:563)
14:15:47 com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:249)
14:15:47 com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:214)
14:15:47 javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157)
14:15:47 javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:162)
14:15:47 javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:171)
14:15:47 javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:189)
14:15:47 com.github.bogdanlivadariu.reporting.junit.builder.JUnitReportBuilder.processXmlReports(JUnitReportBuilder.java:64)
14:15:47 com.github.bogdanlivadariu.reporting.junit.builder.JUnitReportBuilder.<init>(JUnitReportBuilder.java:42)
14:15:47 com.github.bogdanlivadariu.jenkins.reporting.junit.JUnitTestReportPublisher.generateReport(JUnitTestReportPublisher.java:145)
14:15:47 com.github.bogdanlivadariu.jenkins.reporting.junit.JUnitTestReportPublisher.perform(JUnitTestReportPublisher.java:203)
14:15:47 org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:78)
14:15:47 org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:65)
14:15:47 org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:49)
14:15:47 hudson.security.ACL.impersonate(ACL.java:260)
14:15:47 org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:46)
14:15:47 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
14:15:47 java.util.concurrent.FutureTask.run(FutureTask.java:266)
14:15:47 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
14:15:47 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
14:15:47 java.lang.Thread.run(Thread.java:745)

and it works fine when there is an actual test case.

from bootstraped-multi-test-results-report-plugin.

BogdanLivadariu avatar BogdanLivadariu commented on July 20, 2024

@onurgokkocabas the issue you've reported will get fixed in #76

and will be contained in the next release 2.0.2

from bootstraped-multi-test-results-report-plugin.

onurgokkocabas avatar onurgokkocabas commented on July 20, 2024

@BogdanLivadariu thanks a lot !

from bootstraped-multi-test-results-report-plugin.

BogdanLivadariu avatar BogdanLivadariu commented on July 20, 2024

@onurgokkocabas I've just released 2.0.2
you can wait for jenkins to pick it up in the auto update
or you can download it from here and install it manually

after you upgrade, and if the issue is fixed please close the issue

thanks.

p.s. looking forward for new issues that may arise :)

from bootstraped-multi-test-results-report-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.