Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

publish JUnit test result report failing with cucumber and rspec tests #60

Closed
justlanded opened this Issue May 30, 2012 · 5 comments

Comments

Projects
None yet
3 participants

Hello,
I am using hudson version 2.2.0 and ruby version 1.9.2p290 with your lastest version of ci_reporter. I am running my cucumber and spec tests with the ci:setup:cucumber and ci:setup:rspec respectively. The tests run and the reports are generated.

However when I specify the Publish JUnit test result report and specify the Test report XMLs as features/reports/_.xml,spec/reports/_xml, Hudson reports the following exception:

Recording test results
ERROR: Publisher hudson.tasks.junit.JUnitResultArchiver aborted due to exception
java.lang.NullPointerException
at hudson.tasks.junit.CaseResult.getPackageName(CaseResult.java:266)
at hudson.tasks.junit.TestResult.tally(TestResult.java:499)
at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:115)
at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:87)
at hudson.FilePath.act(FilePath.java:758)
at hudson.FilePath.act(FilePath.java:740)
at hudson.tasks.junit.JUnitParser.parse(JUnitParser.java:83)
at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:132)
at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:144)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:630)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:608)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:584)
at hudson.model.Build$RunnerImpl.post2(Build.java:159)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:553)
at hudson.model.Run.run(Run.java:1390)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)

Can you please tell me what I need to do to get this working properly.

Best regards,

Rebecca

Owner

nicksieger commented May 30, 2012

I haven't heard of that error before. Can you navigate through the workspace for the build and see if the xml files did in fact get generated properly? If so, it might be a Hudson issue. Or else there might be content in the report xml files that Hudson does not like. Maybe you can investigate what in the report xml might be causing the problem?

Hello Nick,

Thanks very much for getting back to me. I can navigate through the build
and the xml files are getting generated. I will do as you suggest and
investigate the xml files. I will let you know if I find the problem.

Best regards
Rebecca

On 30 May 2012 18:09, Nick Sieger <
reply@reply.github.com

wrote:

I haven't heard of that error before. Can you navigate through the
workspace for the build and see if the xml files did in fact get generated
properly? If so, it might be a Hudson issue. Or else there might be content
in the report xml files that Hudson does not like. Maybe you can
investigate what in the report xml might be causing the problem?


Reply to this email directly or view it on GitHub:
nicksieger#60 (comment)


Rebecca Denham - Just Landed
General Tel: +34 91 590 2611

rebecca.denham@justlanded.com

http://www.justlanded.com - Helping people abroad!

Find out more about us - http://blog.justlanded.com

Hi Nick,

I found the issue - it was with our cucumber tests. A few of the tests did
not include a "name" on the Feature: line at the start of the file. This
caused the generated xml files to NOT include the name reference in the
tag. Once I fixed the tests, hudson was able to parse the
results successfully.

Again thank you for your help.

Best regards,
Rebecca

On 31 May 2012 08:05, Rebecca Denham rebecca.denham@justlanded.com wrote:

Hello Nick,

Thanks very much for getting back to me. I can navigate through the build
and the xml files are getting generated. I will do as you suggest and
investigate the xml files. I will let you know if I find the problem.

Best regards
Rebecca

On 30 May 2012 18:09, Nick Sieger <
reply@reply.github.com

wrote:

I haven't heard of that error before. Can you navigate through the
workspace for the build and see if the xml files did in fact get generated
properly? If so, it might be a Hudson issue. Or else there might be content
in the report xml files that Hudson does not like. Maybe you can
investigate what in the report xml might be causing the problem?


Reply to this email directly or view it on GitHub:
nicksieger#60 (comment)


Rebecca Denham - Just Landed
General Tel: +34 91 590 2611

rebecca.denham@justlanded.com

http://www.justlanded.com - Helping people abroad!

Find out more about us - http://blog.justlanded.com


Rebecca Denham - Just Landed
General Tel: +34 91 590 2611

rebecca.denham@justlanded.com

http://www.justlanded.com - Helping people abroad!

Find out more about us - http://blog.justlanded.com

Owner

nicksieger commented May 31, 2012

Great, thanks for reporting back, and glad you solved the issue.

@nicksieger nicksieger closed this May 31, 2012

I think I should be adding this information somewhere, like the README or the wiki... It tripped me up so badly, and I was so stoked when I found this issue. Where would the right place be? I'd be happy to just save others the pain and realize the value of this gem....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment