# Notes

# TEST DRIVEN DEVELOPMENT (TDD)

# What

TDD is a tool for developers that aides in the development of high quality code.

# Why

Benefits for new code:

  • TDD encourages more thorough analysis 进行更彻底的分析
  • TDD encourages better design 更好的设计
  • TDD encourages more modular code 使用更多模块化代码
  • TDD encourages more reusable code 使用更多可重用的代码
  • TDD encourages more maintainable code 使用更具可维护性的代码
  • TDD provides a short feedback cycle 提供了较短的反馈周期

Benefits for existing code:

  • Provides automated regression
  • Provides automated impact analysis
  • Reduces fear of refactoring

Saves time!

# When

  • New code
  • Utility code
  • Legacy code...sometimes
    when time and capacity permits

# JUnit

A tool for test-driven development