A summary of data about the Ruby ecosystem.

https://github.com/sj26/rspec_junit_formatter

RSpec results that your CI can read
https://github.com/sj26/rspec_junit_formatter

Keywords

buildkite circleci jenkins junit rspec

Keywords from Contributors

crash-reporting activerecord activejob mvc feature-flag rubygem error-handler rack sinatra oauth2

Last synced: about 4 hours ago
JSON representation

Repository metadata

RSpec results that your CI can read

README.md

RSpec JUnit Formatter

Build results
Gem version

RSpec 2 & 3 results that your CI can read. Jenkins, Buildkite, CircleCI, Gitlab, and probably more, too.

Usage

Install the gem:

gem install rspec_junit_formatter

Use it:

rspec --format RspecJunitFormatter --out rspec.xml

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

You can use it in combination with other formatters, too:

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

Using in your project with Bundler

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

group :test do
  gem "rspec"
  gem "rspec_junit_formatter", require: false
end

Put the same arguments as the commands above in your .rspec:

--format RspecJunitFormatter
--out rspec.xml

Parallel tests

For use with parallel_tests, add $TEST_ENV_NUMBER in the output file option (in .rspec or .rspec_parallel) to avoid concurrent process write conflicts.

--format RspecJunitFormatter
--out tmp/rspec<%= ENV["TEST_ENV_NUMBER"] %>.xml

The formatter includes $TEST_ENV_NUMBER in the test suite name within the XML, too.

Capturing output

If you like, you can capture the standard output and error streams of each test into the :stdout and :stderr example metadata which will be added to the junit report, e.g.:

# spec_helper.rb

RSpec.configure do |config|
  # register around filter that captures stdout and stderr
  config.around(:each) do |example|
    $stdout = StringIO.new
    $stderr = StringIO.new

    example.run

    example.metadata[:stdout] = $stdout.string
    example.metadata[:stderr] = $stderr.string

    $stdout = STDOUT
    $stderr = STDERR
  end
end

Note that this example captures all output from every example all the time, potentially interfering with local debugging. You might like to restrict this to only on CI, or by using rspec filters.

Caveats

  • XML can only represent a limited subset of characters which excludes null bytes and most control characters. This gem will use character entities where possible and fall back to replacing invalid characters with Ruby-like escape codes otherwise. For example, the null byte becomes \0.

Development

Run the specs with bundle exec rake, which uses Appraisal to run the specs against all supported versions of rspec.

Releasing

Bump the gem version in the gemspec, and commit. Then bundle exec rake build to build a gem package, bundle exec rake install to install and test it locally, then bundle exec rake release to tag and push the commits and gem.

License

The MIT License, see LICENSE.

Thanks

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


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 1 day ago

Total Commits: 181
Total Committers: 24
Avg Commits per committer: 7.542
Development Distribution Score (DDS): 0.215

Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
Samuel Cochran s****6@s****m 142
David Feldman d****n@a****m 6
dependabot[bot] 4****] 5
fping f****g@p****m 3
Vincent Landgraf V****f@S****e 2
Daniel Woelfel d****l@g****m 2
Kyle VanderBeek k****v@k****m 2
Olle Jonsson o****n@g****m 2
Tony Ta t****t@g****m 2
Brent Dearth b****t@p****m 1
Akira Matsuda r****e@d****p 1
Daniel Sager d****l@s****e 1
Hannes Kaeufler h****r@g****m 1
Krzysztof Knapik k****o@k****t 1
Matheus Poli m****o@g****m 1
Nate Bird n****d@g****m 1
Richard Lee d****y@g****m 1
Steven Weller g****b@s****m 1
bart w****j@g****m 1
ssein s****n@s****m 1
Tim Rogers t****m@g****m 1
Sean Walbran s****n@s****m 1
Curtis Stewart c****t@m****m 1
r7kamura r****a@g****m 1

Committer domains:


Issue and Pull Request metadata

Last synced: 13 days ago

Total issues: 51
Total pull requests: 64
Average time to close issues: 4 months
Average time to close pull requests: 3 months
Total issue authors: 49
Total pull request authors: 50
Average comments per issue: 3.0
Average comments per pull request: 2.55
Merged pull request: 28
Bot issues: 0
Bot pull requests: 6

Past year issues: 3
Past year pull requests: 4
Past year average time to close issues: 3 minutes
Past year average time to close pull requests: about 3 hours
Past year issue authors: 3
Past year pull request authors: 2
Past year average comments per issue: 1.33
Past year average comments per pull request: 1.0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/sj26/rspec_junit_formatter

Top Issue Authors

  • jantman (2)
  • jayhendren (2)
  • cyberdisk (1)
  • kazuhisa (1)
  • shawnzhu (1)
  • smythey21 (1)
  • zumbrunnen (1)
  • esterlinej (1)
  • wscourge (1)
  • TimAle (1)
  • KlotzAndrew (1)
  • LukevanTricht (1)
  • firedev (1)
  • vjain98 (1)
  • mcallaway (1)

Top Pull Request Authors

  • dependabot[bot] (6)
  • olleolleolle (6)
  • Drowze (2)
  • nourmat (2)
  • kylev (2)
  • skaestle (2)
  • MatheusPoliCamilo (1)
  • andreacfm (1)
  • threez (1)
  • eugeneius (1)
  • TimAle (1)
  • mackstar (1)
  • tonyta (1)
  • bschmeck (1)
  • maschwenk (1)

Top Issue Labels

Top Pull Request Labels

  • dependencies (6)

Package metadata

gem.coop: rspec_junit_formatter

RSpec results that your continuous integration service can read.

  • Homepage: https://github.com/sj26/rspec_junit_formatter
  • Documentation: http://www.rubydoc.info/gems/rspec_junit_formatter/
  • Licenses: MIT
  • Latest release: 0.6.0 (published over 3 years ago)
  • Last Synced: 2026-01-09T04:08:43.897Z (2 days ago)
  • Versions: 25
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 240,367,079 Total
  • Docker Downloads: 470,730,550
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.082%
    • Downloads: 0.106%
    • Docker downloads count: 0.221%
  • Maintainers (1)
rubygems.org: rspec_junit_formatter

RSpec results that your continuous integration service can read.

  • Homepage: https://github.com/sj26/rspec_junit_formatter
  • Documentation: http://www.rubydoc.info/gems/rspec_junit_formatter/
  • Licenses: MIT
  • Latest release: 0.6.0 (published over 3 years ago)
  • Last Synced: 2026-01-08T03:57:53.783Z (3 days ago)
  • Versions: 25
  • Dependent Packages: 1,420
  • Dependent Repositories: 21,456
  • Downloads: 240,232,964 Total
  • Docker Downloads: 470,730,550
  • Rankings:
    • Dependent packages count: 0.036%
    • Downloads: 0.106%
    • Dependent repos count: 0.243%
    • Docker downloads count: 0.274%
    • Average: 1.05%
    • Forks count: 2.367%
    • Stargazers count: 3.273%
  • Maintainers (1)
proxy.golang.org: github.com/sj26/rspec_junit_formatter

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/sj26/rspec_junit_formatter#section-documentation
  • Licenses: mit
  • Latest release: v0.6.0 (published over 3 years ago)
  • Last Synced: 2026-01-09T11:31:17.298Z (1 day ago)
  • Versions: 17
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Forks count: 1.508%
    • Stargazers count: 1.917%
    • Average: 4.942%
    • Dependent packages count: 6.999%
    • Dependent repos count: 9.346%

Dependencies

Gemfile rubygems
  • rspec >= 0
Gemfile.lock rubygems
  • appraisal 2.4.1
  • coderay 1.1.3
  • diff-lcs 1.5.0
  • mini_portile2 2.8.0
  • nokogiri 1.13.4
  • racc 1.6.0
  • rake 13.0.6
  • rspec 3.10.0
  • rspec-core 3.10.1
  • rspec-expectations 3.10.1
  • rspec-mocks 3.10.2
  • rspec-support 3.10.3
  • rspec_junit_formatter 0.5.1
  • thor 1.1.0
rspec_junit_formatter.gemspec rubygems
  • appraisal >= 0 development
  • bundler >= 0 development
  • coderay >= 0 development
  • nokogiri ~> 1.8, >= 1.8.2 development
  • rake >= 0 development
.github/workflows/ci.yml actions
  • actions/checkout v2 composite
  • actions/upload-artifact v2 composite
  • ruby/setup-ruby v1 composite

Score: 30.021764724049607