Friday, December 30, 2005

Tests as Storytelling

If you look at tests as your main product and to code as just an implementation of the intent expressed by tests, then we start looking at tests with greater respect and attention.

Tests deserve refactoring. They should be refined and honed so that intent is expressed exactly in one point. Well, ideally.. :-)

Tests should be read out as a story, as an explanation, as examples.
But they shouldn't be boring saying the same things over and over with little variations, in the hope of catching inconsistencies by brute force.

Reading through test should be like reading through an explanation of the system, showing you how to build up layers of abstraction and sometimes going deep in a concept, exploring all its facets.

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?