# What about TDD?

> How TDD and Gate-Driven Development are alike and how they differ, and why they do not compete: TDD can be part of GDD.

How they're alike and how they aren't. They don't compete: TDD fits inside GDD.

Look up, stop 2 of 4

## What they share

- Both start with the test, not the code.
- Both know a solution can look right without being right.
- Kent Beck's shortcuts show up in both: return a constant and generalize later, or triangulate with a second case. A person follows through to the end; an agent in a hurry can stop at the constant, and that's why the checks have more than one case.

## What changes

|  | TDD | GDD |
| --- | --- | --- |
| First step | A failing test | Everything the agent has to get past: tests, linters, reviews and approvals |
| Who writes what | Usually, the same person writes the test and the code | Whoever goes through the gate doesn't decide how it's validated |
| Against shortcuts | The discipline of whoever programs | That the agent can't touch what evaluates it |
| How much is demanded | The same across all the code | Whatever the risk of the change asks for |
| The colors | The state of the test: it fails or it passes | The risk of the change |

>

## What GDD doesn't ask for

GDD doesn't tell the agent how to work, only what it has to prove. It doesn't require it to do TDD either: in a small experiment, Birgitta Böckeler saw no clear value and measured three to more than eight times as many tokens.

## Before you cross: Does GDD make the agent work with TDD?

- Yes

- No

That's not it. GDD doesn't tell it how to work. It only says what it has to prove.

That's it. GDD doesn't tell it how to work. It only says what it has to prove.

[Next: Where it comes from](https://gate-driven.dev/en/docs/where-it-comes-from/index.html.md) [Go on without answering](https://gate-driven.dev/en/docs/where-it-comes-from/index.html.md) [Index](https://gate-driven.dev/en/docs/index.html.md)
