Provide a summary of this practice.
Test-Driven Development (TDD) is a test-first approach to development.
For background to TDD, see here.
What is the overall goal or intention of this practice?
Test-Driven Development is designed to implement stories with the minimum of high-quality code.
What are the schedule, cost, quality, frequency, performance or other expectations for completing this practice?
What must have happened or been delivered for this practice to be considered complete?
What pre-conditions must be met before this practice is used?
This view shows a simplified version of this process. For full details, explanation and advice, click on the ‘Detailed process’ tab. For background such as entry and exit conditions, click on the ‘Context’ tab.
|1||Select next story.|
|5||Make a change.|
|1||Select next story.||Developer.|
|Development environment set up for story.|
|3||Run test.||Developer.||Test results.|
|5||Make a change.||Updated code.|
|6||Finalise code.||Developer.||Optimised code.|
|7||Repeat test.||Developer.||Test results.|
Issues & risks
What are the key concerns in making a success of this practice?
- TDD needs to be applied by all teams working on a given codebase.
- Understand the limits of TDD.
- Agree explicit TDD standards & procedures.
- Aim for at least 90% code coverage in the working software.
- Create an effective TDD environment.
- Continuous integration, fast compilers, etc.
- For multi-day stories, refactor daily.
- This will simplify the next day’s work.
- And make tomorrow’s refactoring much easier.
- Treat test code as seriously as application code.
- Keep the development process as simple as possible. For example:
- Limit edits to 1-10 before testing.
- Avoid interfacing with complex or dynamic objects until the code is nearly complete.
- It takes a long time to learn the test-first discipline.
- It is helpful if the Iteration Lead tracks progress.
- Testing alone is not enough.
- Even if all tests are passed, the user may still be dissatisfied.
- TDD is not an excuse to abandon good engineering practice.