Skip to content
RSpec results formatted as JUnit XML that Hudson can read
Ruby
Find file
Latest commit 01b2969 Dec 27, 2015 @sj26 Merge pull request #37 from dlackty/patch-1
Test against latest Ruby versions

README.md

RSpec JUnit Formatter

Build results Gem version

RSpec 2 & 3 results that Jenkins can read. Probably a few other CI servers, too.

Inspired by the work of Diego Souza on RSpec Formatters after frustration with CI Reporter.

Usage

Install the gem:

gem install rspec_junit_formatter

Use it:

rspec --format RspecJunitFormatter  --out rspec.xml

You'll get an XML file with your results in it.

More Permanent Usage

Add it to your Gemfile if you're using Bundler. Put it in the same groups as rspec.

In your .rspec, usually alongside another formatter, add:

--format RspecJunitFormatter
--out rspec.xml

You can use it in combination with other formatters:

rspec --format progress --format RspecJunitFormatter --out rspec.xml

Roadmap

  • It would be nice to split things up into individual test suites, although would this correspond to example groups? The subject? The spec file? Not sure yet.
  • This would sit nicely in rspec-core, and has been designed to do so.

License

The MIT License, see LICENSE.

Something went wrong with that request. Please try again.