On this page
Overview
SimpleCov is a Ruby library that gathers execution data through Ruby’s built-in Coverage library, then merges, filters, groups, formats, and displays results across test suites. It includes HTML and JSON reporting and supports line and branch thresholds.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Merge coverage from multiple test suites
SimpleCov caches and merges results from unit, integration, and other suites into one view of unexecuted code. Built-in HTML and JSON formatters provide browsable and machine-readable reports.
Sources: [1]
Configure measured code and quality thresholds
It supports line and branch coverage, minimum coverage, maximum allowed drops, and per-file missed-line limits. Include paths, exclusions, groups, and profiles can live in the start block or .simplecov.
Sources: [1]
Best fit
Investigate concrete gaps in Ruby test suites
It fits teams using RSpec, Minitest, Rails, or other Ruby test setups that want to identify unexecuted branches, files never loaded by tests, and regressions across suites.
Sources: [1]
Before adoption
Start coverage before loading application code
SimpleCov.start must run before the application code you want to measure is required. Server processes and parallel test workers need their own instrumentation and result-merging plan, and a percentage alone does not establish test quality.
Sources: [1]
Official sources
- [1]simplecov-ruby/simplecov README at reviewed commit(2026-10-04)
- [2]SimpleCov v1.3.2 release(2026-10-04)
- [3]SimpleCov MIT License(2026-10-04)
Supplemental curator note
Treat the percentage as a signal rather than the goal. Review which tests exercise each line and whether unloaded files are included before judging coverage quality.
Try it in 3 steps
- 1
Create a Ruby demo project
Create a Gemfile and a lib directory for project code in an empty demo directory.
mkdir simplecov-demo && cd simplecov-demo && bundle init && mkdir lib - 2
Add SimpleCov
On Ruby 3.3 or later, add the reviewed v1.3.2 gem and resolve dependencies.
bundle add simplecov --version 1.3.2 - 3
Measure a minimal Ruby program
Start SimpleCov, then load and execute project-local lib/demo.rb. Finally, parse the result JSON and require both the target file and at least one executed line.
printf '%s\n' 'module Demo' ' def self.answer' ' 42' ' end' 'end' > lib/demo.rb && printf '%s\n' "require 'simplecov'" "SimpleCov.start { cover 'lib/**/*.rb' }" "require_relative 'lib/demo'" "abort 'unexpected result' unless Demo.answer == 42" > driver.rb && bundle exec ruby driver.rb && ruby -rjson -e "r=JSON.parse(File.read('coverage/.resultset.json')); c=r.values.first.fetch('coverage'); f=c.keys.find { |p| p.end_with?('/lib/demo.rb') }; abort 'lib/demo.rb missing from report' unless f; abort 'no executed line recorded' unless c.fetch(f).fetch('lines').compact.any? { |n| n > 0 }; puts f"
Growth
Growth trends · Last 30 days
4,927 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 42
- Open PRs
- 0
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- ruby
- test-coverage
- code-quality
- rails
- coverage
- coverage-report
- coverage-library
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- WebMock4,049 Stars
2 shared tag(s) · 1 shared category(s) · Same language
stub Ruby HTTP requests without real network calls and verify expectations against methods, URIs, headers, and bodies
Ruby - Rswag2,202 Stars
2 shared tag(s) · 1 shared category(s) · Same language
test Rails APIs through request specs and generate OpenAPI documents and Swagger UI from the same definitions
Ruby - RSpec118 Stars
2 shared tag(s) · 1 shared category(s) · Same language
describe Ruby behavior with examples, expectations, and test doubles and run it through a CLI
Ruby - OpenProject16,304 Stars
2 shared tag(s) · Same language
self-host Gantt, agile planning, time tracking, wikis, and meetings in one project platform
Ruby - Sidekiq13,563 Stars
2 shared tag(s) · Same language
Queue Ruby application work in Redis-compatible storage and process it with threads
Ruby - RuboCop12,911 Stars
2 shared tag(s) · Same language
Check Ruby code for style violations and likely bugs, with optional corrections
Ruby
Report incorrect information
Tell us if any listing information is incorrect or outdated.