Book
Growing Object-Oriented Software, Guided by Tests
Steve Freeman, Nat Pryce
Summary
Steve Freeman and Nat Pryce wrote this for developers who already know the mechanics of test-driven development and want to see it sustained across a whole system rather than a short exercise. Eleven consecutive chapters go to one worked example, an auction sniper application taken from a walking skeleton through to error handling, each feature driven by a failing test written first. Running it at that length lets the book show TDD at two levels at once: acceptance tests driving what the system does from the outside, unit tests driving the objects inside. Mock objects are treated as a design tool rather than a testing convenience, a way to state an object's relationships with its collaborators before they exist. Surrounding chapters cover starting out and then what surfaces later: tests that are hard to read or diagnose, complex test data, persistence, threads, and asynchrony.
Target Readers
- Developers who know the red-green-refactor cycle and want to see it carried across an entire application instead of a kata
- Engineers who reach for mock objects as a testing convenience and want to understand them as a way of designing the relationships between objects
- Teams whose test suites have grown hard to read or to diagnose, looking for the practices that keep them worth maintaining
Tags
Colophon
- Publisher
- Shoeisha
- ISBN
- 978-4798124582
- Published
- Sep 2012
- List price
- ¥4,620incl. taxMay differ from the actual selling price on Amazon
Get this book
* The link above is an advertisement via Amazon Associates.Related Books
Prerequisites
- Recommended
Test-Driven Development
Kent Beck
Reason: After getting comfortable with unit-level TDD, you move to outside-in TDD—driving from acceptance tests down to units—to design the collaboration between objects itself. Mocks become a tool for expressing collaboration, not just a stand-in for implementations.
- Related
Unit Testing Principles, Practices, and Patterns
Vladimir Khorikov
Reason: Once you can judge the quality of an individual test, you extend to a design approach that grows object responsibilities and collaboration through tests. Choosing the right test double becomes feedback on the design itself.
Next Books
- Recommended
Effective Software Testing
A developer's guide
Maurício Aniche
Reason: After practicing how to grow design through tests, you raise the sufficiency of the test cases themselves with systematic techniques. You turn both wheels—good design and thorough cases—to reduce gaps in testing.