Growing Object-Oriented Software, Guided by Tests

Front Cover
Pearson Education, Oct 12, 2009 - Computers - 384 pages

Test-Driven Development (TDD) is now an established technique for delivering better software faster. TDD is based on a simple idea: Write tests for your code before you write the code itself. However, this "simple" idea takes skill and judgment to do well. Now there's a practical guide to TDD that takes you beyond the basic concepts. Drawing on a decade of experience building real-world systems, two TDD pioneers show how to let tests guide your development and “grow” software that is coherent, reliable, and maintainable.

Steve Freeman and Nat Pryce describe the processes they use, the design principles they strive to achieve, and some of the tools that help them get the job done. Through an extended worked example, you’ll learn how TDD works at multiple levels, using tests to drive the features and the object-oriented structure of the code, and using Mock Objects to discover and then describe relationships between objects. Along the way, the book systematically addresses challenges that development teams encounter with TDD—from integrating TDD into your processes to testing your most difficult features. Coverage includes

  • Implementing TDD effectively: getting started, and maintaining your momentum throughout the project
  • Creating cleaner, more expressive, more sustainable code
  • Using tests to stay relentlessly focused on sustaining quality
  • Understanding how TDD, Mock Objects, and Object-Oriented Design come together in the context of a real software development project
  • Using Mock Objects to guide object-oriented designs
  • Succeeding where TDD is difficult: managing complex test data, and testing persistence and concurrency

What people are saying - Write a review

LibraryThing Review

User Review  - brikis98 - LibraryThing

A great read for anyone interested in automated testing and TDD. Pros: * Makes a strong case for testing: better design, faster feedback, user experience first, regression, and most importantly, the ... Read full review

User Review - Flag as inappropriate

Solid book with good examples. I feel like this book took my skills to the next level. Thanks!


The Process of TestDriven Development
Maintaining the TestDriven Cycle
Building on ThirdParty Code
A Worked Example
Commissioning an Auction Sniper
Towards a Real User Interface
Sniping for Multiple Items
Teasing Apart Main
Filling In the Details
Sustainable TestDriven Development
Constructing Complex Test Data
Test Diagnostics
Test Flexibility

The Walking Skeleton
Passing the First Test
Getting Ready to
The Sniper Makes a
The Sniper Wins the Auction
Advanced Topics
Writing a Hamcrest Matcher

Other editions - View all

Common terms and phrases

About the author (2009)

Steve Freeman is an independent consultant specializing in Agile software development. A founder member of the London Extreme Tuesday Club, he was chair of the first XPDay and is a frequent organizer and presenter at international conferences. Steve has worked in a variety of organizations, from writing shrink-wrap software for IBM, to prototyping for major research laboratories. Steve has a Ph.D. from Cambridge University, and degrees in statistics and music. Steve is based in London, UK.

Nat Pryce has worked as a programmer, architect, trainer, and consultant in a variety of industries, including sports reportage, marketing communications, retail, telecoms, and finance. With a Ph.D. from Imperial College London, he has also worked on research projects and does occasional university teaching. An early adopter of Extreme Programming, he has written or contributed to several open source libraries that support Test Driven Development. He was one of the founding organizers of the London XPDay and regularly presents at international conferences. Nat is based in London, UK.

Freeman and Pryce were joint winners of the 2006 Agile Alliance Gordon Pask award.

Bibliographic information