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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:24:26+00:00 2026-06-09T13:24:26+00:00

After running some tests, I’m convinced there has to be something wrong with my

  • 0

After running some tests, I’m convinced there has to be something wrong with my setup (windows, rubymine and latest ruby versions). My times right now are:

Finished tests in 14.289817s, 0.0700 tests/s, 0.3499 assertions/s.

1 tests, 5 assertions, 0 failures, 0 errors, 0 skips

Process finished with exit code 0

With 5 VERY easy tests (just checking if validation on empty fields works). The total time for these 5 unit tests is 160 seconds, over 2 minutes.

What could I do to improve this speed?

Here are the tests:

require 'test_helper'

class ItemTest < ActiveSupport::TestCase
  test 'item attributes must not be empty' do
    item = Item.new
    assert item.invalid?
    assert item.errors[:name].any?
    assert item.errors[:description].any?
    assert item.errors[:image_url].any?
    assert item.errors[:rating].any?
  end
end
  • 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-06-09T13:24:27+00:00Added an answer on June 9, 2026 at 1:24 pm

    Your problem is Windows. We use JRuby on Windows and it actually runs faster than RubyInstaller(mingw) ruby on Windows but we do see very slow results when running test suites or starting a rails server. About 1 minute for a single test run due to the loading of the Rails environment.
    You have a few options:

    1. Switch to linux / osx
    2. Use spork to keep a couple rails environments pre-loaded for your tests. Note that this isn’t perfect but it will reduce your times substantially. With this option you’ll probably want to use minitest or rspec, I had trouble getting spork to work on Windows with testunit. With spork you should be able to get your single test run time down to about 10 seconds.
    3. Write as many of your tests to run outside of Rails, in other words to not require the Rails stack. This will be very fast, you should be able to run a test in only a few seconds but as you could guess, it’s hard to test a lot of things (controllers, views) outside of rails. Works perfectly though for functions you’ve broken out into modules that already do not require anything from rails.

    Good luck!

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

Sidebar

Related Questions

Running some user-load tests with jmeter, and noticed that for each page load after
I'm use nosetests to run some tests. However, after the tests have finished running,
After running some usability tests, I found that participants opened a jQuery Lightbox to
We are running some tests using selenium. We have dedicated Windows XP VM's for
I'm running some simple form tests where values are added fields. After each value
The following output appears after running some rake tasks: Loaded suite /usr/bin/rake Started Finished
Im trying to update the contents of an element after running some php code.
After running a model in fortran (95) I end up with some result arrays
I have some Java code that is throwing out of memory exceptions after running
I'm running mod_wsgi on apache2. It's running Django and for some reason, after I

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.