sj26 / rspec_junit_formatter

RSpec results that your CI can read

Home Page:http://rubygems.org/gems/rspec_junit_formatter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Returning error information outside an example

pingfr opened this issue · comments

commented

We are using the XML formatter in our CI process. In Rspec 3.6.0 (https://github.com/rspec/rspec-core/blob/master/Changelog.md#360beta2--2016-12-12), they added support to get an error count of errors that occur outside of an example. Errors in an example typically return as a test failure. We would like to get this error count surfaced via the formatter for use in the CI.

The API that is supported in you XML dump has an error element that is always set to zero. Would it be acceptable if the supporting code was altered to get the error count reported from Rspec 3.6.0 and return it in that field? I would be happy to put a pull request together if this sounds like a reasonable proposal. I believe the solution would be to return 0 for version of Rspec 3 < 3.6.0 and the count of errors returned from Rspec for later versions.

This sounds excellent, and would be a valuable contribution - thank you!

commented

I see there are test failures. I don't have travis running locally. I am sure it is test data issues with the 2.x version of Rspec. Trying to track it down.

#86 has been merged, and will be in a new release soon. Thanks!

hi @sj26, looks like the latest release version is v0.4.1(in 2018) which not includes PR #86

how about release a new version?

Thanks for the prompt.

Done! See v0.5.0.