I’ve been working on a unit testing paper that sums up my experience in unit testing, and discusses some of the core information that I feel is important about the subject. It’s very much a work in progress, but I wanted to get it out sooner rather than later. I’ll be continuously updating it as time goes on.
Update: I updated the PDF location to one that doesn’t require registration.
There are some really great books out there about unit testing, but I think some of them are trying too hard to be long enough to be considered a “book”. I set out to create a document that fills the gap between the various snippets of information from blog posts, and the comprehensive books on the subject. If you’re interested in something a bit more in-depth, here are some great books on the subject:
The paper currently consists of 5 main sections:
- Why Write Unit Tests?
- Unit Test Mechanics
- Common Unit Testing Strategies
- Designing for Testability
- Advanced Techniques
Here is a more complete snapshot of the current outline:
- Unit Testing & Managers
- What Unit Tests Really Do
- Types of Testing
- Testing Framework
- Test Runner
- Unit Test Structure
- Other Test Attributes
- What is Refactoring?
- Test Driven Development
- Evolving Code
- When Should You Write Unit Tests?
- Test is for Functionality, Not Code!
- The Constraints of Reality
- Interfaces – Quick Overview
- Using a Mocking Framework
- The Test Driven Design Paradox
- Testing Under Pressure
- Extracting Duplicate Logic
- Modular Design Benefits
Remember, if you want to hear more about unit testing, I’ll be speaking in Northeast Wisconsin Saturday, May 9th.