No commit activity in last 3 years
No release in over 3 years
a minitest-reporters extension for integrating with parallel_tests. designed to integrate with parallel_tests-extensions
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 10.0

Runtime

 Project Readme

Minitest::Reporters::ParallelTestsReporter

a minitest-reporters extension for integrating with parallel_tests. Designed to integrate with parallel_tests-extensions

Installation

gem 'minitest-reporters-parallel_tests_reporter'
gem 'parallel_tests-extensions' # not necessary, but recommended

Usage

In the example below we integrate with parallel_tests-extensions to compile the reports from each process and print out the failed tests:

require 'parallel_tests/extensions'
require 'minitest/reporters/parallel_tests_reporter'

ParallelTests.after_tests do 
  if ParallelTests.first_process?
    report = Minitest::Reporters::ParallelTestsReporter.compile_reports! 
    failed = report.select {|r| r[:failures].any?}
    if failed.any?
      puts "\nThe following tests failed:"
      puts failed.map {|f| f[:location]}.join("\n")
    end
  end
end

if ParallelTests.is_running?
  Minitest::Reporters.use!(Minitest::Reporters::ParallelTestsReporter.new)
end