RSpec 3 results in the logfmt format that you can push to your observability tool such as Honeycomb
Install the gem:
gem install rspec_logfmt_formatter
Use it:
rspec --format RspecLogfmtFormatter --out rspec.txt
You'll get a file rspec.txt
with your results in it.
You can use it in combination with other formatters, too:
rspec --format progress --format RspecLogfmtFormatter --out rspec.txt
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_logfmt_formatter"
end
Put the same arguments as the commands above in your .rspec
:
--format RspecLogfmtFormatter --out rspec.txt
You can sum repeated values in one file using rspec_logfmt_formatter_collate rspec.txt
.
It will rewrite a file like:
tests.count="3"
tests.count="1"
into:
tests.count="4"
There are many ways you can push this to honeycomb. One way is to use the buildevents binary. Then output your spec output to BUILDEVENT_FILE
e.g.
bundle exec rspec --format RspecLogfmtFormatter --out $BUILDEVENT_FILE
Pull the repo and run bundle install
, the specs are run with bundle exec rspec
and make sure to read the CONTRIBUTING.md.
Currently this is a manual process and can only be run by a carwow developer.
- Ensure your
~/.gem/credentials
are correct - Update the CHANGELOG.md
- Update the version.rb
- Run
bundle exec rake upload
- Check the tag was pushed and the new version was released
The MIT License, see LICENSE.