minitest

A guide for generating JUnit test reports for minitest tests

1. Generate JUnit

Install the minitest-reporters gem:

gem install minitest-reporters

Configure the JUnitReporter reporter in your test_helper.rb file:

require "minitest/reporters"
Minitest::Reporters.use! Minitest::Reporters::JUnitReporter.new(:reports_dir => "results")

2. Output Location

This will automatically write all test results to JUnit XML files in the results directory.

Next Step

JUnit files generated with minitest are compatible with Trunk Flaky Tests. See CI Providers for a guide on how to upload test results to Trunk.

Last updated