Skip to content

mohclips/rspec_html_reporter

 
 

Repository files navigation

RSpec HTML Reporter

Publish pretty rspec reports

This is a ruby RSpec custom formatter which generates pretty html reports showing the results of rspec tests. It has features to embed images and videos into report providing better debugging information in case test is failed. Check this Sample Report.

New Updates

My updates

July 2019

  • Toggle spec details
  • Toggle group status
  • Added Overview Title - RSPEC_HTML_REPORTER_TITLE
  • Added Overview Summary - RSPEC_HTML_REPORTER_SUMMARY
  • Added Execution Date

June 2019

  • Added skip description

  • Added group description

  • Added OS details on overview page

  • Added TARGET_HOST environment variable (IP/host we are testing)

  • Added CLOUD_ENV environment variable (Name of cloud environment)

  • Graph shows count per example in labels

  • Fix bug with UTF-8

  • Better display of example titles

  • Allow checkbox on/off of example statuses in reports

I updated this to help display CIS tests on images built in various cloud environments

Examples

Setup

Add this in your Gemfile:

gem 'rspec_html_reporter'

Running

Either add below in your .rspec file

--format RspecHtmlReporter

or run RSpec with --format RspecHtmlReporter like below:

REPORT_PATH=reports/$(date +%s) bundle exec rspec --format RspecHtmlReporter spec

Above will create reports in reports directory.

Usage

Images and videos can be embed by adding their path into example's metadata. Check this Sample Test.

Credits

This library is forked from vbanthia/rspec_html_reporter. Which was forked from kingsleyh/rspec_reports_formatter. Original Credits goes to kingsleyh

About

Rspec custom formatter to produce beautiful reports from rspec

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 56.8%
  • HTML 42.7%
  • Gherkin 0.5%