Growing Object-Oriented Software, Guided by Tests (häftad)
Fler böcker inom
Häftad (Paperback)
Antal sidor
Pryce, Nat
234 x 177 x 20 mm
500 g
Antal komponenter

Growing Object-Oriented Software, Guided by Tests

Häftad, Engelska, 2009-10-26
501 kr
Skickas inom 2-5 vardagar.
Fri frakt inom Sverige för privatpersoner.
Finns även som
Visa alla 1 format & utgåvor
Foreword by Kent Beck


"The authors of this book have led a revolution in the craft of programming by controlling the environment in which software grows. --Ward Cunningham


At last, a book suffused with code that exposes the deep symbiosis between TDD and OOD. This one's a keeper. --Robert C. Martin


If you want to be an expert in the state of the art in TDD, you need to understand the ideas in this book.--Michael Feathers


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, youll 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

Visa hela texten

Passar bra ihop

  1. Growing Object-Oriented Software, Guided by Tests
  2. +
  3. Life 3.0

De som köpt den här boken har ofta också köpt Life 3.0 av Max Tegmark (inbunden).

Köp båda 2 för 697 kr


Har du läst boken? Sätt ditt betyg »

Bloggat om Growing Object-Oriented Software, Guided ...

Övrig information

Steve Freeman s an independent consultant specialising in the Agile delivery of software. A pioneer of Agile software development in the UK, he has built applications for banks, ISPs, financial data providers, and specialist software companies. Steve is a developer of the jMock and nMock libraries. Nat Pryce is an independent consultant with expertise in software design, software development process and practices. He is also a research fellow at Imperial College. Nat is a developer of the jMock and nMock libraries for test-driven development.


Foreword     xv

Preface     xvii

Acknowledgments     xxi

About the Authors     xxiii




Chapter 1: What Is the Point of Test-Driven Development?     3

Software Development as a Learning Process     3

Feedback Is the Fundamental Tool     4

Practices That Support Change     5

Test-Driven Development in a Nutshell     6

The Bigger Picture     7

Testing End-to-End     8

Levels of Testing     9

External and Internal Quality     10


Chapter 2: Test-Driven Development with Objects     13

A Web of Objects     13

Values and Objects     13

Follow the Messages     14

Tell, Dont Ask     17

But Sometimes Ask     17

Unit-Testing the Collaborating Objects     18

Support for TDD with Mock     19


Chapter 3: An Introduction to the Tools     21

Stop Me If Youve Heard This One Before     21

A Minimal Introduction to JUnit 4     21

Hamcrest Matchers and assertThat()     24

jMock2: Mock Objects     25




Chapter 4: Kick-Starting the Test-Driven Cycle     31

Introduction     31

First, Test a Walking Skeleton     32

Deciding the Shape of the Walking Skeleton     33

Build Sources of Feedback     35

Expose Uncertainty Early     36


Chapter 5: Maintaining the Test-Driven Cycle     39

Introduction     39

Start Each Feature with an Acceptance Test     39

Separate Tests That Measure Progress from Those That Catch Regressions     40

Start Testing with the Simplest Success Case     41

Write the Test That Youd Want to Read     42

Watch the Test Fail     42

Develop from the Inputs to the Outputs     43

Unit-Test Behavior, Not Methods     43

Listen to the Tests     44