8. Testing: Test-Driven Development¶
Let us change our traditional attitude to the construction of programs: Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do.
—Donald Knuth, Literate Programming, 1984
- 8.1. FIRST, TDD, and Red–Green–Refactor
- 8.2. Anatomy of a Test Case: Arrange, Act, Assert
- 8.3. Isolating Code: Doubles and Seams
- 8.4. Stubbing the Internet
- 8.5. CHIPS: Intro to RSpec on Rails
- 8.6. Fixtures and Factories
- 8.7. Coverage Concepts and Types of Tests
- 8.8. Other Testing Approaches and Terminology
- 8.9. CHIPS:The Acceptance Test/Unit Test Cycle
- 8.10. The Plan-And-Document Perspective on Testing
- 8.11. Fallacies and Pitfalls
- 8.12. Concluding Remarks: TDD vs. Conventional Debugging