Wednesday, November 11, 2009

Functional Testing Reinvented

For the last few months our team has been using ruby and RWebSpec for functional testing. The only problem with this type of testing is that it's very brittle. The slightest change to an html element name or even renaming a view can cause our tests to fail. We have been actively searching for a better solution without any results. At least until NOW.

Jimmy Bogard recently hosted a screencast called "UI Testing". From the looks of it, the Jimmster has solved our brittle functional testing problem. Using watiN, gallio and most importantly designing for testability our functional tests can be less fragile. It's actually no different than test driven development. The first thing that you learn with test driven development is that you have to design for testability. If your interested in making your legacy code more testable I suggest giving Michael Feathers book "Working Effectively with Legacy Code" a read. As Michael puts it, all code is legacy code.

On a separate note our team has also been struggling with deciding how to integrate functional testing into our sprint. One idea that we have is to create a set of acceptance criteria for each story. The acceptance criteria would then be confirmed through our functional tests. Therefore, a story can only be marked as complete if it passes all acceptance criteria.

Click here to view Jimmy's awesome screencast.

1 comment:

marko said...

Protection is ensured tax exempt development and has been around for a long time. These arrangements are 100 years more established than the IRS. Utilizing this vehicle to make a saving money framework would have disposed of all the bust cycles that have tormented the economy over the most recent 25 years. check cashing chula-vista