Monday, February 18, 2008

Code Reviews Are Insufficient

One of the things about having a lot of automated tests is that it can slow down your story acceptance process.

Accepting a feature that involves a manual test looks like this:
  • Sync the code (or take a build)
  • Set up your environment with that code/build
  • Perform the manual tests specified in the feature
  • Play with the feature for a while - using exploratory testing or your other favorite non-test-sequence-based technique
  • Give a thumbs up or thumbs down
Accepting a feature that involves an automated test looks like this:
  • Sync the code (or take a build)
  • Run the automated test yourself
  • Play with the feature for a while (see above)
  • Wait. Allow the automated tests to run in their normal (nightly, for example) environment
  • Give a thumbs up or thumbs down
The waiting is particularly painful, because it means you can't just sit down and accept that story. So the temptation is to simply run the automated test, perform a code review, and say you're done. Resist the temptation.

In theory, theory and practice are the same. In practice, they're often different.*

Code reviews tell you the theory of the code. Don't accept the feature until you've seen the theory AND the practice.



* This was put to me this way by someone on my team. I don't think he made it up, but thanks for the pointer, Chip! Further update 20 Feb 2008: Chip tells me he got this quote from Rachel Silber.

No comments:

Post a Comment