Display the summary of a slow test when tests finished.
MIT License
Display the summary of a slow test when tests finished.
$ ./bin/rake test
Run options: --seed 4004
# Running:
........................
Finished in 3.367417s, 7.1271 runs/s, 16.0360 assertions/s.
24 runs, 54 assertions, 0 failures, 0 errors, 0 skips
[SlowTest]PageIntegrationTest#test_create_new_page : 1.17s
[SlowTest]PageTest#test_do_not_find_page_when_use_invalid_title : 1.00s
Add this line to your application's Gemfile:
gem 'minitest-slow_test'
And then execute:
$ bundle
Or install it yourself as:
$ gem install minitest-slow_test
Such a test is output more than one second, and processing makes by default it.
When You want to change the processing time, please set it as follows in test_helper.rb
require 'minitest/slow_test'
Minitest::SlowTest.long_test_time = 0.5 # specified in seconds
If there is a test that you do not want to display even if slow, use the exclude
options.
Minitest::SlowTest.exclude_test_name = %(test_do_not_display) # specify the test name in the Array of String
minitest-reporters
When use it with minitest-reporters
, it is necessary to set Minitest::SlowTest::Reporter
in Minitest::Reporters.use!
Example:
require 'minitest/slow_test/reporter'
Minitest::Reporters.use! [Minitest::Reporters::SpecReporter.new, Minitest::SlowTest::Reporter.new]
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)