By piccoloprincipe
via googletesting.blogspot.com
Published: Aug 06 2010 / 15:50
In my quest to explore TDD I recently found another propery of TDD-written code that I hadn't expected: When reviewing or just reading such code, it's often best to first read the tests.
When I look at new code or a code change, I ask: What is this about? What is it supposed to do? Questions that tests often have a good answer for. They expose interfaces and state use cases. This is cool, I thought, and decided to establish test-first reading as my code-reviewing routine. Of course this just applies the specification aspect of tests: Reading the specs before reading the code.
Add your comment
Voters For This Link (14)
-
piccoloprincipe -
majson -
andy_t -
aclarke -
mswatcher -
jchiu1106 -
rsmaniak -
Srikanth.Shenoy -
javanperl -
mairbek -
martinig -
sqazone -
davidmartin -
arturas.gusevas


