Back in March 2005 Kevin Lawrence wrote this great article for Better Software called "Grow Your Test Harness Naturally" He's got a link to the PDF on his blog, luckily. It's one of those articles that keeps being cited by various people one runs into here and there. I read it over and over until I Got It. The basic premise is: don't write the framework first. Write some tests, then extract the common code from those tests, write more tests, abstract common code, write more tests, refactor, repeat. The refactoring generates the framework. The thing is, I had never had enough code complex enough, running against an app stable enough, to really and truly build a framework this way. Until now. I have a large number things to do with Watir. First I automated each path through the code individually. I did about 10 of these. Each of my paths had to set up a certain set of rules, so I abstracted a method "make_rules" Each of my paths had to set some data
QA is not evil