ReportFactory helps you save each of your test runs so that they are always available for reports and analytics. It consists of three parts:
- A rails server that provides an interface via JSON API and saves your test runs in a DB;
- A web dashboard which gives you an easy way to configure your test projects and reports;
- And a test formatter that automatically sends reports to the server after each test run. This repo is the formatter for RSpec.
Follow these instructions to get Report Factory running with Docker. The configuration is ready for production.
Add this line to your application's Gemfile:
gem 'report_factory-rspec'
And then execute:
$ bundle
Or install it yourself as:
$ gem install report_factory-rspec
Before you start using this formatter, make sure you have the ReportFactory server deployed and running.
To setup this formatter to work with your RSpec tests, add this to your spec_helper.rb
file:
require 'report_factory/rspec'
and configure:
ReportFactory::Rspec.configure do |config|
config.url = "The url of the ReportFactory server. It's 'http://0.0.0.0:3000' if you're running locally"
config.project_name = "The name of the project that you are testing. Needs to be previously created in ReportFactory"
config.tags = ['Tags', 'to', 'help', 'you', 'group', 'your', 'reports']
config.auth_token = "Your user X_API_KEY. Can be found in ReportFactory in your user information"
end
Then you can just simply run rspec with --format ReportFactory::Rspec::Formatter
and your reports will be available on the server after each test run.
You can add that line to your .rspec
file if you want it to be the default behavior.
After checking out the repo, run bin/setup
to install dependencies. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/igor-starostenko/report_factory-rspec. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the ReportFactory::Rspec project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.