All Projects → avmnu-sng → rspec-tap-formatters

avmnu-sng / rspec-tap-formatters

Licence: MIT license
TAP Producer for RSpec-3

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to rspec-tap-formatters

Rspec Hue formatter
Bring RSpec integration into your room with Philips Hue
Stars: ✭ 59 (+195%)
Mutual labels:  formatter, rspec
eslint-formatter-git-log
ESLint Formatter featuring Git Author, Date, and Hash
Stars: ✭ 36 (+80%)
Mutual labels:  formatter, reporter
hitchstory
Type-safe, StrictYAML based BDD framework for python.
Stars: ✭ 24 (+20%)
Mutual labels:  behavior-driven-development, bdd-tests
rspec html reporter
Rspec custom formatter to produce beautiful reports from rspec
Stars: ✭ 32 (+60%)
Mutual labels:  rspec, reporter
r spec-clone.rb
A minimalist RSpec clone with all the essentials.
Stars: ✭ 38 (+90%)
Mutual labels:  rspec
fusuma-plugin-tap
Tap and Hold gestures plugin for Fusuma
Stars: ✭ 16 (-20%)
Mutual labels:  tap
gulp-reporter
Error report for: CSSLint/EditorConfig/ESLint/HTMLHint/JSCS/JSHint/PostCSS/Standard/TSLint/XO
Stars: ✭ 17 (-15%)
Mutual labels:  reporter
house style
A shared house style for Ruby projects
Stars: ✭ 19 (-5%)
Mutual labels:  rspec
django-aloe-bdd
BDD with Django and Aloe
Stars: ✭ 27 (+35%)
Mutual labels:  behavior-driven-development
stylus-supremacy
A Node.js script that helps formatting Stylus files.
Stars: ✭ 86 (+330%)
Mutual labels:  formatter
google-one-tap
Google One Tap Login
Stars: ✭ 37 (+85%)
Mutual labels:  tap
homebrew-ecmascript
Homebrew formulae for ECMAScript engines
Stars: ✭ 13 (-35%)
Mutual labels:  tap
react-fastclick
A react component that triggers click events for taps (short localized touches)
Stars: ✭ 20 (+0%)
Mutual labels:  tap
j8spec
Library that allows tests written in Java to follow the BDD style introduced by RSpec and Jasmine.
Stars: ✭ 45 (+125%)
Mutual labels:  rspec
vscode-formatting-toggle
A VS Code extension that allows you to toggle the formatter (Prettier, Beautify, …) ON and OFF with a simple click.
Stars: ✭ 52 (+160%)
Mutual labels:  formatter
capybara-chromedriver-logger
Enables console.log/error/info output from Javascript feature specs running with Chromedriver
Stars: ✭ 54 (+170%)
Mutual labels:  rspec
serverspec-extended-types
A set of extended types for ServerSpec 2.x
Stars: ✭ 28 (+40%)
Mutual labels:  rspec
jsonfmt
Like gofmt, but for JSON files.
Stars: ✭ 70 (+250%)
Mutual labels:  formatter
go-qmk-keymap
This is a utility that can format your keymap array of layers as well as generating ascii-art diagrams of those layouts.
Stars: ✭ 20 (+0%)
Mutual labels:  formatter
address-format
A PHP library to parse street addresses to localized formats
Stars: ✭ 76 (+280%)
Mutual labels:  formatter

Gem Version Build Status Documentation Status Inline docs Maintainability Test Coverage Gitter

RSpec TAP Formatters

RSpec TAP Formatters produces TAP 13 output with a proper nested display of example groups and includes stats for the total number of passed, failed, and pending tests per example group.

Why use TAP Formatter

With TAP format, it is easier to view failure reason immediately without waiting for the failure dumps at the end. Also, TAP is a universal format, so one can:

  • Leverage other tools to parse the output.
  • Mix in different types of tests with consistent output.

Formatters Behavior

RSpec TAP Formatters supports four variants:

  1. RSpec::TAP::Formatters::Default
  2. RSpec::TAP::Formatters::Compact
  3. RSpec::TAP::Formatters::Flat
  4. RSpec::TAP::Formatters::FlatCompact

Each formatter respects the color configuration for the execution and only prints colored output when enabled. However, writing to a file will never use colors. When writing the report to a file, each formatter will print progress status on the standard output:

  • . for passing
  • F for failing
  • * for pending

Sample Report

Sample report for string_spec.rb using RSpec::TAP::Formatters::Default format:

TAP version 13
# test: String {
  # group: #present? {
    # group: when whitespaces and other characters {
      ok 1 - returns true
      1..1
      # tests: 1, passed: 1
    }
    # group: when nil {
      not ok 1 - returns false
        ---
        location: "./resources/string_spec.rb:8"
        error: |-
          Failure/Error: expect(string.present?).to eq(false)
          NoMethodError:
            undefined method `present?' for nil:NilClass
        backtrace: "./resources/string_spec.rb:9:in `block (4 levels) in <top (required)>'"
        ...
      1..1
      # tests: 1, failed: 1
    }
    # group: when whitespaces only {
      ok 1 - returns false
      1..1
      # tests: 1, passed: 1
    }
    1..3
    # tests: 3, passed: 2, failed: 1
  }
  1..3
  # tests: 3, passed: 2, failed: 1
}
1..3
# tests: 3, passed: 2, failed: 1
# duration: 0.026471 seconds
# seed: 27428

You can check the reports for other formats here.

Installation

Installation is pretty standard:

gem install rspec-tap-formatters

You can install using bundler also but do not require it in Gemfile. Make sure to use it as a test dependency:

group :test do
  # other gems
  gem 'rspec-tap-formatters', '~> 0.1.0', require: false
end

You can also install using the GitHub package registry:

source 'https://rubygems.pkg.github.com/avmnu-sng' do
  gem 'rspec-tap-formatters', '~> 0.1.0', require: false
end

Usage

You can specify the format as the command argument:

rspec --format RSpec::TAP::Formatters::Default

To write to file, provide the --out argument:

rspec --format RSpec::TAP::Formatters::Default --out report.tap

You can also configure the .rspec file:

# other configurations
--format RSpec::TAP::Formatters::Default
--out report.tap

Documentation

Read more about TAP specifications and supported formats in the official docs.

Source Code Documentation

Read the source code documentation here.

Compatibility

RSpec TAP Formatters supports MRI 2.3+ and RSpec 3.

Changelog

The changelog is available here.

Copyright

Copyright (c) 2019 Abhimanyu Singh. See LICENSE.md for further details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].