2024-01-03 20:00:00 +00:00
|
|
|
---
|
|
|
|
title: >
|
2024-09-08 22:09:54 +00:00
|
|
|
Writing test and implementation code are the same task
|
2024-01-03 20:00:00 +00:00
|
|
|
pubDate: 2023-08-15
|
|
|
|
permalink: >-
|
2024-12-19 20:26:33 +00:00
|
|
|
daily/2023/08/15/writing-test-and-implementation-code-are-the-same-task
|
2024-01-03 20:00:00 +00:00
|
|
|
tags:
|
2024-09-08 22:09:54 +00:00
|
|
|
- automated-testing
|
|
|
|
- test-driven-development
|
2024-01-03 20:00:00 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
In Sunday's email, I said not to estimate separately for testing and implementation.
|
|
|
|
|
|
|
|
But you can't do this anyway if you're doing test-driven development.
|
|
|
|
|
|
|
|
With TDD, you aren't writing all of your tests and all of the implementation code or vice versa.
|
|
|
|
|
|
|
|
You're continuously switching back and forth, starting by writing a failing test and then enough implementation code for it to pass.
|
|
|
|
|
|
|
|
Then you write more test code, whether expanding the same test or writing a new one until you have a new failure.
|
|
|
|
|
|
|
|
You get it to pass, refactor, and repeat the process until the task is complete.
|
|
|
|
|
|
|
|
It's all part of the same task and the same estimate.
|