Test-Driven Development Guide: PMBOK 7th Edition
Test-Driven Development (TDD) is a key Agile project management practice and hence an important part of the Project Management Professional (PMP) exam.
What is Test-Driven Development?
TDD is a development technique where developers write tests before they write the associated code. Developers focus on the desired behavior of the software to inform the design of the software.
Why is TDD Important?
TDD helps reduce the occurrence of defects in the code, promotes simplicity, and boosts the confidence of the developers in the software. It encourages developers to consider their software from the user's perspective.
How does TDD work?
In TDD, you begin by writing a test for a feature. The test will fail initially because there's no code written to pass the test. Then you write just enough code to pass the test. Once the test passes, you refactor the code to remove any duplication or redundancy.
Exam Tips: Answering Questions on Test-Driven Development.
1. Understand that TDD is a cyclic process involving initially failing tests, writing code, then refactoring.
2. Remember that TDD is rooted in Agile methodologies and values communication, simplicity, and feedback.
3. Emphasize the role of TDD in minimizing defects and driving design.
4. Recognize that refactoring is a key step in the TDD process to improve the quality and maintainability of the code.
Note: The exam may present scenarios where TDD might be applicable. Being familiar with the key principles of TDD can help identify the best responses.