The project is in a healthy, maintained state
A custom reporter for RSpec which generates pretty HTML reports
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 11.1
~> 6.4
~> 3.11.0
>= 2.0.2
~> 3.39
~> 13.0
~> 7.0

Runtime

>= 4.1.4, < 7.1.3
~> 3.28
>= 3.4, < 4.0
~> 2.2
 Project Readme

Gem Version CI

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.

Themes

Yeti is the default theme for the report, however you can change the theme by using the environment variable THEME=cerulean in the terminal before you execute your tests. The example below illustrates how to use this variable with your tests:

THEME=sketchy bundle exec rspec 

The included themes you can choose from are:

  • cerulean
  • litera
  • materia
  • sketchy
  • spacelab

Credits

This library is forked from vbanthia/rspec_html_reporter. The original credit goes to kingsleyh for kingsleyh/rspec_reports_formatter