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.
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
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
- Slow Tests
- Shallow Tests
- Invisible Code
We will look at examples of each of these problems, and show how to prevent them from infecting your project.