No release in over 3 years
Low commit activity in last 3 years
A minitest JSON reporter plugin
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.6.2
 Project Readme

minitest-json-reporter

A Minitest reporter plugin that emits test results as JSON.

Installation

Add the gem to your application's Gemfile:

group :test do
  gem "minitest-json-reporter"
end

Then install:

bundle install

Usage

Load the plugin from your test helper:

require "minitest/json_reporter"

You can then enable JSON output with the existing CLI flag:

rails test --json
ruby -Ilib:test test/example_test.rb --json

For runners that need to work with Rails 8, prefer the environment variable. Rails 8 loads test files after Minitest starts parsing CLI options, so custom flags loaded from test_helper.rb are too late, but environment-based activation works:

MINITEST_JSON=1 rails test
MINITEST_JSON=1 ruby -Ilib:test test/example_test.rb

You can also enable the reporter from Ruby:

require "minitest/json_reporter"

Minitest::JsonReporter.use!

Development

Run tests with:

bundle exec rake test

License

The gem is available as open source under the terms of the MIT License.