Friday, February 06, 2009

Selenium Trick: Warm Up Site First

I’ve been having some issues where the first Selenium test suite in a series of suites was failing because of timeouts. Our Selenium test runs happen right after we completely repave our build box with new bits and a new database, so there’s some compile delays when Selenium first hits.

Solution? Make the very first test suite one that has only one test case in it: hit the site, and do a ClickAndWait on the site’s homepage.:

WarmUpSite.html

open /csfunctionaltests 
clickAndWait link=Home 

Yes, ClickAndWait in a regular test case should be fine, but it wasn’t working. I’ve had a lot better luck using this approach and my irritation at chasing non-issue issues is slowly  lowering.

No comments:

Post a Comment