Re:Browser testing sucks, it's time to start doing it right.
by andrewdavey on Thursday May 05, 2011 @02:11PM
(#2518332)
Reducing tight coupling is definitely a concern I'm looking into. I can't see there being any silver bullets, but a good framework should certainly encourage a sustainable way of working.
I've developed a rather nice asynchronous, sequential, execution model for test code. So they avoid the callback-hell you'd see with multi-step async tests. The spin assert idea mentioned in the article is very useful, and I'll be borrowing it for sure! :)
I'm wary of running tests in parallel, due to concurrency issues. However, I guess spinning up multiple web servers and in-memory databases would work fine.
That said, it's not the important part. Selenium (and watir, windmill, etc.) is an execution tool, it doesn't help you avoid some very, very large pitfalls waiting for you down the road. Too often your tests are tightly coupled with the dom, data and selectors are strewn all about, you have manual pauses and timeouts set by someone who left years ago, and you have so many that the whole thing takes two weeks to run (yes, I've seen this a number of times).
Basically, I don't care about the tool to execute the tests anymore. They'll all become interchangeable with Selenium 2 anyway. The much more valuable piece here is in creating tests that are maintainable and a joy to work with.
Certainly best of luck, please be sure to share you experiences and insights! There's always more to be learned.