Thuật ngữ Test Driven Development (TDD) trong Agile là gì? Luyện thi PMI-ACP

Test Driven Development (TDD) – programming practice for developers for verification

  • Also broadly known as test-first development
  • Test cases (unit tests) are written before codes (i.e. think about the design first before coding)
    • allow the coders to focus on the end results
    • development driven by test cases (evolved from XP) to assure technical excellence and good design, write code unit all tests are passed
    • codes written in this way are high-quality, maintainable and reliable
  • The TDD processes:
    1. Red: write a failing unit test showing the intent of what the new code
    2. Green: write code to pass the test and add code to source repository
    3. Refactor / Clean: clean up the code (lean, mean and clear)
  • Rules of thumb for TDD:
    1. Don’t write any new code until a failing test is written
    2. Test everything that could “possibly” break
    3. Always improve by refactoring and do small chunks of refactoring frequently
  • Technical debts: compromises on code quality in order to meet the schedule. Refactoring is paying back technical debts


Nếu có bất cứ chia sẻ về luyện thi PMP, PMI-RMP, PMI-ACP hay góp ý bạn vui lòng chia sẻ ở dưới phần bình luận. Tôi rất vui lòng về điều đó. Cảm ơn.

Leave a Reply

Tôi rất vui khi bạn đã quyết định để lại comment, tôi sẽ phản hồi tất cả các comment nhanh nhất khi có thể. Chú ý tất cả comment đều được kiểm duyệt cẩn thận, xin đừng cố gắng spam hoặc quảng cáo. Xin cảm ơn.