A long-lived project that still receives updates
A modern approach to code coverage.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.0
~> 1.0
 Project Readme

Covered

Screenshot

Covered uses modern Ruby features to generate comprehensive coverage, including support for templates which are compiled into Ruby.

  • Incremental coverage - if you run your full test suite, and the run a subset, it will still report the correct coverage - so you can incrementally work on improving coverage.
  • Integration with Sus, Git, RSpec and Minitest- no need to configure anything - out of the box support for these platforms.
  • Supports coverage of views - templates compiled to Ruby code can be tracked for coverage reporting.

Development Status

Motivation

Originally, Ruby coverage tools were unable to handle evaled code. This is because the coverage module built into Ruby doesn't expose the necessary hooks to capture it. Using the parser gem and trace points allows us to do our own source code analysis to compute executable lines, thus making it possible to compute coverage for "templates".

After this concept prooved useful, it was integrated directly into Ruby.

Usage

Please see the project documentation for more details.

  • Getting Started - This guide explains how to get started with covered and integrate it with your test suite.

  • Configuration - This guide will help you to configure covered for your project's specific requirements.

See Also

  • simplecov – one of the original coverage implementations for Ruby, uses the built-in coverage library.
  • sus - a test framework which uses covered to generate coverage reports.

Contributing

We welcome contributions to this project.

  1. Fork it.
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin my-new-feature).
  5. Create new Pull Request.

Developer Certificate of Origin

This project uses the Developer Certificate of Origin. All contributors to this project must agree to this document to have their contributions accepted.

Contributor Covenant

This project is governed by the Contributor Covenant. All contributors and participants agree to abide by its terms.