Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

PIVOTAL LABS
Standup 5/3/2012 Time, time and more time

Helps

“How do I avoid timing problems while doing integration tests on single page apps?”

  • Use a wait_until block with a selector which has not been cached.
  • Use a wait_until block with a piece of javascript using evaluate_script which you expect to return when your page is finished loading.
  • Use a wait_until block which waits for all AJAX to stop using $.ajaxStop().

Interesting

  • Time.parse(invalid) will throw an exception, but
    Time.zone.parse(invalid) will return nil. Because Time.parse is part of the Ruby library while Time.zone is part of Rails.
  • parallel_tests really does speed up your tests. It munges all the output together into an ugly mess though.

Comments
  1. Erik Hanson says:

    I tried parallel_tests but found Specjour easier to deal with. I also found that tests didn’t speed up much until I put MySQL on a RAM disk (might be unnecessary if you’re using an SSD)

  2. Jim Kingdon says:

    What Erik said and curious whether other people have tried specjour. I’ve seen a lot of custom setups for running specs in parallel but surprisingly few things which are off the shelf or nearly so.

Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *