Testing Anti-patterns: How to Fail With 100% Test Coverage
The Testing Anti-patterns series explores numerous testing-related missteps, provides tips for identifying and extinguishing them in an existing codebase, and offers strategies for avoiding them altogether on new projects. The series began as a conference presentation (titled How to Fail With 100% Test Coverage), and many of the anti-patterns are now available through the collection of essays below.
Essays
And while not specific to any one anti-pattern, this post offers a collection of related quotes and resources spanning the last ten years and then some.
How to Fail With 100% Test Coverage
Abstract
With an expressive language such as Ruby or Groovy and with modern test practices, 100% C0 test coverage is readily achievable. But 100% coverage is meaningless without other supporting habits and practices. Over the last few years, we have taken dozens of projects to 100% coverage, and there are still plenty of things that can go wrong:
- Fragile Mocking
- Incidental Coverage
- The Ugly Mirror
- Overspecification
- Slow Tests
- Underspecification
- Shallow Tests
- Invisible Code
We will look at examples of each of these problems, and show how to prevent them from infecting your project.
Presentations
-
NFJS - Research Triangle Software Symposium - 06/22/2008 [JR]
-
NFJS - Central Ohio Software Symposium - 07/26/2008 [SH]
-
raleigh.rb (mp3) (iTunes) (video) - 08/19/2008 [JR]
-
Software Test & Performance Conference - 09/26/2008 [JR]
-
NFJS - Twin Cities Software Symposium - 10/11/2008 [SH]
-
NFJS - Gateway Software Symposium - 03/07/2009 [SH]