Developer Testing: Building Quality Into Software (Addison-Wesley Signature)

Alexander Tarlinder



How do successful agile teams deliver bug-free, maintainable software—iteration after iteration? The answer is: By seamlessly combining development and testing. On such teams, the developers write testable code that enables them to verify it using various types of automated tests. This approach keeps regressions at bay and prevents “testing crunches”—which otherwise may occur near the end of an iteration—from ever happening. Writing testable code, however, is often difficult, because it requires knowledge and skills that cut across multiple disciplines.


In Developer Testing, leading test expert and mentor Alexander Tarlinder presents concise, focused guidance for making new and legacy code far more testable. Tarlinder helps you answer questions like: When have I tested this enough? How many tests do I need to write? What should my tests verify? You’ll learn how to design for testability and utilize techniques like refactoring, dependency breaking, unit testing, data-driven testing, and test-driven development to achieve the highest possible confidence in your software. Through practical examples in Java, C#, Groovy, and Ruby, you’ll discover what works—and what doesn’t.


You can quickly begin using Tarlinder’s technology-agnostic insights with most languages and toolsets while not getting buried in specialist details. The author helps you adapt your current programming style for testability, make a testing mindset “second nature,” improve your code, and enrich your day-to-day experience as a software professional. With this guide, you will

  • Understand the discipline and vocabulary of testing from the developer’s standpoint
  • Base developer tests on well-established testing techniques and best practices
  • Recognize code constructs that impact testability
  • Effectively name, organize, and execute unit tests
  • Master the essentials of classic and “mockist-style” TDD
  • Leverage test doubles with or without mocking frameworks
  • Capture the benefits of programming by contract, even without runtime support for contracts
  • Take control of dependencies between classes, components, layers, and tiers
  • Handle combinatorial explosions of test cases, or scenarios requiring many similar tests
  • Manage code duplication when it can’t be eliminated
  • Actively maintain and improve your test suites
  • Perform more advanced tests at the integration, system, and end-to-end levels
  • Develop an understanding for how the organizational context influences quality assurance
  • Establish well-balanced and effective testing strategies suitable for agile teams





- 從開發人員的角度了解測試的紀律和詞彙
- 基於成熟的測試技術和最佳實踐來編寫開發人員測試
- 辨識影響測試性的代碼結構
- 有效命名、組織和執行單元測試
- 掌握傳統和「模擬風格」的測試驅動開發的基本要素
- 使用模擬框架或不使用模擬框架來利用測試替身
- 在沒有運行時支援的情況下,實現程式契約的好處
- 控制類、組件、層和層之間的依賴關係
- 處理測試用例的組合爆炸,或需要許多相似測試的情況
- 管理無法消除的代碼重複
- 積極維護和改進你的測試套件
- 在整合、系統和端到端層面上進行更高級的測試
- 瞭解組織背景如何影響質量保證
- 建立適合敏捷團隊的均衡有效的測試策略