---
title: "How not to do TDD"
url: "https://osherove.com/blog/2011/7/29/how-not-to-do-tdd.md"
canonical: "https://osherove.com/blog/2011/7/29/how-not-to-do-tdd.html"
published: "2011-07-28T21:25:22"
updated: "2011-07-28T21:25:22"
tags: ["book"]
author: "Roy Osherove"
description: "Update : It seems that much further down in the book, they do cover a more minimalist and simplistic approach to make the tests pass . I was too quick to write, and did not look further in the book. I would recommend…"
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# How not to do TDD

By Roy Osherove July 28, 2011 In [book](https://osherove.com/blog/category/book)

**Historical article** · Originally published July 28, 2011; technical details may be outdated.

> **Update**:
>
> It seems that much further down in the book, [they do cover a more minimalist and simplistic approach to make the tests pass](http://proquest.safaribooksonline.com/book/-/9780470643204/chapter-1-the-road-to-test-driven-development/a_quick_example_of_the_tdd_app#X2ludGVybmFsX0ZsYXNoUmVhZGVyP3htbGlkPTk3ODA0NzA2NDMyMDQvODM=). I was too quick to write, and did not look further in the book. I would recommend people to SKIP the first chapter of that book, and move directly to the “getting started” part. My apologies for the early-to-blame nature of this post. I will make a more concrete investigation next time. 

Here’s an excerpt from one of the first chapters of a new book about TDD in C# - what’s wrong with the following paragraph and following code?

> The reason for the test failure (as shown by the highlighted text) is that you have not implemented the method. The next step is to write code to make this test pass: 

Found it? I’ll highlight the offending sentence:

> The reason for the test failure (as shown by the highlighted text) is that you **have not implemented the method.**

yes. And then they go on to FULLY IMPLEMENT the whole method, in a non test driven way. [This is the offending book](http://proquest.safaribooksonline.com/book/-/9780470643204/chapter-1-the-road-to-test-driven-development/a_quick_example_of_the_tdd_app#X2ludGVybmFsX0ZsYXNoUmVhZGVyP3htbGlkPTk3ODA0NzA2NDMyMDQvMTM=). I would NOT recommend buying it, as it shows a clear lack of understanding many things. first, a test not compiling is not the same as failing. second, you don’t fully implement the most complicated way to solve something.  

For a good tdd book I’d instead recommend [Kent Beck’s oldie but a goodie](https://www.amazon.com/exec/obidos/ASIN/0321146530/?tag=iserializable-20), and [this good book](https://www.amazon.com/exec/obidos/ASIN/0321503627/?tag=iserializable-20). (get both, not one of them, as they complete each other each other)

## More in book

[All posts in book](https://osherove.com/blog/category/book)

- Aug 19, 2013

    ### [Book & Audio Book: Notes to a Software Team Leader](https://osherove.com/blog/2013/8/19/book-audio-book-notes-to-a-software-team-leader.html)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
