Unit Testing Maturity Scale

by Jeff Langr

April 01, 2009

  • Level 0 – Not Performed: Tests? We don’t need no stinkin’ tests!

  • Level 1 – Performed Informally: Test-after development (TAD). Sporadic coverage, individual-level process adherence.

  • Level 2 – TDD:

    • TDD Level 0: Chaotic. Some developers do TDD. Others don’t care if the tests break.

    • TDD Level A: Performed Informally. The team agrees that unit tests must pass in the build. Developers pick and choose what should be test-driven.

    • TDD Level B: Performed Consistently. All team members build unit tests. Some unit tests are not focused enough (tendency toward integration tests). Tests do not “document” very well. Sporadic production code refactoring enabled as a benefit of having tests.

    • TDD Level C: Breakthrough. Team members use each TDD cycle to refactor production code and tests, but constrain to single classes (test+target). Most tests clearly document class capabilities.

    • TDD Level D: Optimizing. Standards around test organization, naming, and structure are evident from the code. BDD in heavy use. Team actively looks for reuse across tests, and continually refactors “mother” and other test utility classes.

This is a work in progress! Please help me iteratively and incrementally improve it.

Comments

Steve Campbell April 1, 2009 at 11:57am

Level 3 – BDD

  • Level 0 – TDD being called BDD

  • Level A – Ubiquitous naming

  • Level B – Single line tests, test refactoring

  • Level C – Testing DSL


Share your comment

Jeff Langr

About the Author

Jeff Langr has been building software for 40 years and writing about it heavily for 20. You can find out more about Jeff, learn from the many helpful articles and books he's written, or read one of his 1000+ combined blog (including Agile in a Flash) and public posts.