Software Development: TDD

  • Test-driven development
  • principles
    • test first: do not write function until you have a unit test for it
    • do not write unit test more than necessary to fail
    • do not write code more than just enough to pass unit test
  • Untitled.png
  • TDD overview
    • Plan
      • requirement and cut problem
    • Data define
      • write data structure problem need
    • Tests
      • write unit test
    • Code
      • write unit test for next function
      • code and modify until pass test, repeat with new functions
      • repeat
    • Complete
      • run it and show all testing pass

留下评论