RSpec Pretty HTML Reporter
Produce pretty RSpec reports.
This is a custom reporter for RSpec which generates pretty HTML reports showing the results of rspec tests. It has features to embed images and videos into the report providing better debugging information when a test fails.
Setup
Add this to your Gemfile:
gem 'rspec-pretty-html-reporter'
Generating the report
Either add the below into your .rspec
file
--format RspecPrettyHtmlReporter
or run RSpec with --format RspecPrettyHtmlReporter
like below:
REPORT_PATH=reports/$(date +%s) bundle exec rspec --format RspecPrettyHtmlReporter spec
This will create the reports in the reports
directory.
Usage
Images and videos can be embed by adding their path into example's metadata. For an example of how to do this, please check out this Sample Test.
Credits
This library is forked from vbanthia/rspec_html_reporter. The original credit goes to kingsleyh for kingsleyh/rspec_reports_formatter