Project

top_tests

0.0
No commit activity in last 3 years
No release in over 3 years
Top tests lists the 10 slowest tests after execution
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

What is it?¶ ↑

Top tests displays your 10 slowest tests after execution. The goal is to help you keeping your tests fast.

Moreover top tests can break your build if any test is taking longer than a specified duration.

How to use it?¶ ↑

Add to your Gemfile.

group :test do
  gem 'top_tests'
end

Then run your test as usual and you will have a similar output:

Top 10 slowest tests:
    0.429 ApplicationControllerTest#test_notify_error
    0.322 HoneyBadgersControllerTest#test_show
    0.200 BearsControllerTest#test_destroy_collection
    0.134 SuricatsControllerTest#test_can_not_update
    0.124 SuricatsControllerTest#test_create
    0.105 SuricatsControllerTest#test_update
    0.096 HoneyBadgersControllerTest#test_create
    0.093 HoneyBadgersControllerTest#test_update
    0.091 SuricatsControllerTest#test_destroy
    0.090 HoneyBadgersControllerTest#test_show

Run your your with the option ‘–max-time=SECONDS` to break the tests that are slower than the specified time:

3 tests are taking longer than 0.2 seconds:
    0.410 HoneyBadgerTest#test_fighting_a_cobra
    0.228 SuricatTest#test_caught_by_an_eagle
    0.203 HoneyBadgerTest#test_eating_larvae