---
title: "What is a good example of unit test over specification?"
url: "https://osherove.com/blog/2008/3/1/what-is-a-good-example-of-unit-test-over-specification.md"
canonical: "https://osherove.com/blog/2008/3/1/what-is-a-good-example-of-unit-test-over-specification.html"
published: "2008-03-01T14:08:02"
updated: "2008-03-01T14:08:02"
tags: ["Agile", "Art Of Unit Testing", "Unit Testing"]
author: "Roy Osherove"
description: "I'm working on chapter 8 of my upcoming book and I need to come up with a good example of over specification in unit tests, that leads to an unmaintainable test in the long run (fragile test). I have my ideas on how to…"
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/"
---

# What is a good example of unit test over specification?

By Roy Osherove March 1, 2008 In [Agile](https://osherove.com/blog/category/agile), [Art Of Unit Testing](https://osherove.com/blog/category/art-of-unit-testing), [Unit Testing](https://osherove.com/blog/category/unit-testing)

**Historical article** · Originally published March 1, 2008; technical details may be outdated.

I'm working on chapter 8 of [my upcoming book](http://artofunittesting.com/) and I need to come up with a good example of over specification in unit tests, that leads to an unmaintainable test in the long run (fragile test). I have my ideas on how to show it, but I'd love to know what you consider an over specified test, that can be shown with a concise (or even a bit contrived) code example.

\- How would you define test over specification?

\- how would you show it?

\- are there multiple kinds of over specification with different ways to tackle them?

## More in Agile

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

- Mar 9, 2008

    ### [Testing loops?](https://osherove.com/blog/2008/3/9/testing-loops.html)

- Mar 9, 2008

    ### [Testing ASP.NET MVC Controllers with Typemock Isolator](https://osherove.com/blog/2008/3/9/testing-aspnet-mvc-controllers-with-typemock-isolator.html)

- Feb 27, 2008

    ### [Typemock Isolator 4.2 released](https://osherove.com/blog/2008/2/27/typemock-isolator-42-released.html)

- Feb 25, 2008

    ### [An Agile phone Number](https://osherove.com/blog/2008/2/25/an-agile-phone-number.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/
