Customizable output formats for Ruby's Minitest
open sourceMITfree
minitest-reporters swaps Minitest's test runner output for one or more reporters, set with one line in test_helper.rb: a red-green default reporter, a spec-style reporter, a progress bar, a JUnit XML reporter for CI servers, an HTML report, a mean-time report of the slowest tests, and reporters for RubyMine, TeamCity and TextMate. It picks the IDE or CI reporter automatically from environment variables, a MINITEST_REPORTER variable overrides the choice, and custom reporters include Minitest::Reporter and override its hooks.
Problems it solves
- make Minitest output readable like RSpec's spec format
- get JUnit XML from my Rails Minitest suite for CI
- see which Minitest tests are the slowest
Features
- Default, spec, progress-bar, JUnit XML, HTML and mean-time reporters
- Several reporters at once
- Reporters for RubyMine, TeamCity and TextMate, chosen automatically from the environment
- MINITEST_REPORTER environment variable to pick a reporter
- Custom reporters through Minitest::Reporter hooks
Limitations
- Overwrites Minitest.backtrace_filter by default, including Rails' filter, unless you pass the filter to use!1
Alternatives
The same job
These do what minitest-reporters does.
- minitest-rg Adds red and green colour to Minitest output
- rspec_junit_formatter Writes RSpec results as JUnit XML that CI services can read
- jest-junit Jest reporter that writes JUnit XML files
- xcresultparser Parse the binary .xcresult bundles from Xcode builds and test runs