Table of Contents

 

Copyright

Brief Table of Contents

Table of Contents

Preface

Acknowledgments

About this Book

About the Cover Illustration

1. A TDD primer

Chapter 1. The big picture

1.1. The challenge: solving the right problem right

1.1.1. Creating poorly written code

1.1.2. Failing to meet actual needs

1.2. Solution: being test-driven

1.2.1. High quality with TDD

1.2.2. Meeting needs with acceptance TDD

1.2.3. What’s in it for me?

1.3. Build it right: TDD

1.3.1. Test-code-refactor: the heartbeat

1.3.2. Developing in small increments

1.3.3. Keeping code healthy with refactoring

1.3.4. Making sure the software still works

1.4. Build the right thing: acceptance TDD

1.4.1. What’s in a name?

1.4.2. Close collaboration

1.4.3. Tests as a shared language

1.5. Tools for test-driven development

1.5.1. Unit-testing with xUnit

1.5.2. Test frameworks for acceptance TDD

1.5.3. Continuous integration and builds

1.5.4. Code coverage

1.6. Summary

Chapter 2. Beginning TDD

2.1. From requirements to tests

2.1.1. Decomposing requirements

2.1.2. What are good tests made of?

2.1.3. Working from a test list

2.1.4. Programming by intention

2.2. Choosing the first test

2.2.1. Creating a list of tests

2.2.2. Writing the first failing test

2.2.3. Making the first test pass

2.2.4. Writing another test

2.3. Breadth-first, depth-first

2.3.1. Faking details a little longer

2.3.2. Squeezing out the fake stuff

2.4. Let’s not forget to refactor

2.4.1. Potential refactorings in test code