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 712891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:53:59+00:00 2026-05-14T04:53:59+00:00

Is it normal for my test suite to take 5 seconds just to launch?

  • 0

Is it normal for my test suite to take 5 seconds just to launch? Even when running an empty suite it still takes this long. Is it because it’s firing up a new instance of rails on each run? If so, is there anyway to keep it persistent?

Example:

rlepidi@rlepidi:~/projects/rails/my_project$ time rake test
/usr/bin/ruby1.9.1 -I"lib:test" "/var/lib/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/release_test.rb" 
Loaded suite /var/lib/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader
Started

Finished in 0.000181867 seconds.

0 tests, 0 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
0% passed

real    0m4.173s
user    0m3.820s
sys 0m0.288s

As you can see, this empty test is really fast, but there is still 4 seconds of overhead for some reason. I’m using Test::Unit with Shoulda.

  • 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-14T04:54:00+00:00Added an answer on May 14, 2026 at 4:54 am

    Test speed bottleneck is the time it takes Rails to load its environment. Run script/console and see how long it takes to load you into your environment…it should be the same.

    One you have a large enough codebase with many plugins & gems, load time can be as high as 1 minute!!
    If you are like me & stop running tests b/c you are sick of waiting 30 seconds just to test a small change, you need to run a test server like spec_server, or even better: spork!

    You will find that there may be strange issues dealing with class cacheing with spec_server which is why I prefer spork.

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

Sidebar

Related Questions

Just upgraded to Django 1.3. My test suite is now showing a bunch of
I'm trying to call Error(My Test) in normal cpp class (Not a COM object,
The Problem: Until recently, I could build and test my app like normal. Now,
The normal JSON approach looks something like this: { list: [ { header1: some
A normal UserControl looks like this in XAML: <UserControl x:Class=mynamespace.foo ...namespaces...> <!-- content -->
I'd like to run my test suite in the debugger and break on any
We are currently working on an instrumentation test suite which runs on our build
I just uploaded a test site on the following location : www.betterclassofleaders.co.cc/whackk I am
I've got a test site here (still in development) and I'm trying to get
I placed this control in a test app, and it works fine. But in

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.