Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 454607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:17:16+00:00 2026-05-12T22:17:16+00:00

I’d like to know how much took to run the 10 most time consuming

  • 0

I’d like to know how much took to run the 10 most time consuming tests.. like I can do with rspec, any suggestion?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T22:17:16+00:00Added an answer on May 12, 2026 at 10:17 pm

    Short answer:

    gem install minitest # Install MiniTest
    gem install minitest_tu_shim # Install Test::Unit shim
    use_minitest yes # Use MiniTest Test::Unit shim instead of stdlib Test::Unit 
    ruby your_test.rb -v # Run your test in verbose mode
    

    Ruby 1.9 use MiniTest as its default testing framework instead of Test::Unit. MiniTest is smaller, faster, has more useful features, and is largely backward compatible with Test::Unit. One of those newer features is measuring the time each test takes with the -v flag. When you run the e sure you place this flag after the script

    If, as in rails, you use Rake::TestTask to run your tests, you’ll can either specify it at runtime by running

    rake test TESTOPTS='-v'
    

    or specify it in the task by adding -v to the options attribute, like so

    Rake::TestTask.new do |t|
      t.options = '-v'
    end
    

    Finally, if you’re using rails and MiniTest just isn’t good enough for you, you might appreciate the test_benchmark plugin. Usage is easy. Add the following line to your config/environments/test.rb

    config.gem "timocratic-test_benchmark",
      :lib => 'test_benchmark',
      :source => 'http://gems.github.com'
    

    Install it with

    RAILS_ENV='test' rake gems:install
    

    From then on, you’ll get a nice sorted list when you run your tests

    rake test:units
    [...]
    Test Benchmark Times: Suite Totals:
    7.124 test_destroy(FeedTest)
    7.219 test_create(FeedTest)
    7.646 test_subscribe_to_auto_discovery(FeedTest)
    9.339 test_auto_discover_updates_url(FeedTest)
    9.543 test_find_or_create_by_auto_discover_url(FeedTest)
    15.780 test_import_from_opml(FeedTest)
    

    I’m sorry to say that MiniTest and the test_benchmark plugin are incompatible with each other, but I strongly encourage you to try MiniTest, since it’ll make your tests faster, and will continue to be supported in Ruby 1.9.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I would like to run a str_replace or preg_replace which looks for certain words
Does anyone know how can I replace this 2 symbol below from the string
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a jquery bug and I've been looking for hours now, I can't
I've got a string that has curly quotes in it. I'd like to replace
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.