Pivotal Labs

Main menu

Skip to primary content
Skip to secondary content
  • About
  • Case Studies
  • Team
    • Executives
    • Locations
      • San Francisco (HQ)
      • Boston
      • Boulder
      • Denver
      • London
      • Los Angeles
      • New York
  • Community
    • Blogs
    • Tech Talks
    • Events
  • Careers
    • Lifestyle
    • Principles & Practices
    • Benefits
    • FAQ
    • Apply
  • Contact
    • Press Room
    • Press Releases
    • In The News
    • Press Kit
  • All
  • Labs
  • Standup
  • Tracker

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

Phil Goodwin
Thursday, May 3, 2012

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.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter

2 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)

    May 3, 2012 at 4:06 pm

  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.

    May 3, 2012 at 9:10 pm

Add New Comment Cancel reply

Your email address will not be published.

Phil Goodwin

Phil Goodwin
San Francisco

Recent Posts

  • “expect errors”
  • Standup 5/2/2012 A hack a day…
  • Standup 5/1/2012 Coping with external APIs
Subscribe to Phil's Feed

Author Topics

agile (8)
clang (1)
db (1)
party (1)
rack (1)
ruby (1)
ccrb (3)
events (1)
jasmine (1)
jenkins (1)
open source (1)
ci (1)
database (1)
git (1)
headless (1)
rvm (1)
selenium (1)
shell (1)
  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • Contact
  • Labs
  • Events

Contact Us

contact@pivotallabs.com
+1 415-77-PIVOT
TwitterLinkedInFacebook

Pivotal Tracker

Tracker is the award-winning agile project management tool that enables real-time collaboration around a shared, prioritized backlog.
Visit pivotaltracker.com >