---
title: "NSPec - The evolution of unit tests into behavior description?"
url: "https://osherove.com/blog/2006/6/28/nspec-the-evolution-of-unit-tests-into-behavior-description.md"
canonical: "https://osherove.com/blog/2006/6/28/nspec-the-evolution-of-unit-tests-into-behavior-description.html"
published: "2006-06-28T14:00:00"
updated: "2006-06-28T14:00:00"
tags: ["Agile"]
author: "Roy Osherove"
description: "Get ready for another naming storm. This time it's going to be \"Behavior Driven Development\". The most important thing coming out of the BDD \"movement\" thee days is NSpec - a framework and specification for writing…"
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/"
---

# NSPec - The evolution of unit tests into behavior description?

By Roy Osherove June 28, 2006 In [Agile](https://osherove.com/blog/category/agile)

**Historical article** · Originally published June 28, 2006; technical details may be outdated.

Get ready for another naming storm. This time it's going to be "Behavior Driven Development". The most important thing coming out of the BDD "movement" thee days is [NSpec](http://nspec.tigris.org/) \- a framework and specification for writing Behavior Verification code (Think Unit Tests with a clearer syntax that explains what you're \*really\* doing).

Here's a code sample using [NSpec](http://nspec.tigris.org/):

              **\[Specification\]**                **public void BooleanSpecificationExample()**                **{**                        **// ...Some set up code...**                        **Specify.That( someObj.SomeMethod() ).ShouldBeFalse();**                        **// Or...**                        **Specify.That( someObj.SomeOtherMethod() ).ShouldBeTrue();**                **}**

Does feels pretty nice, but I think there's along way to go before this start feeling like something I would use for my production code. Still, I think this is an interesting direction to go, but the real development would be to make these behaviors possibly written by the customer for specific scenarios, and the developer for other scenarios - one system that handles both cases.

Not that the customer should write code, but they can write in a laungage that can be transformed into such code. With this syntax it's possible.

Still - this is a long way away, and right now, NSPec looks awful promising.

\[via [larkware](http://www.larkware.com/dg6/TheDailyGrind914.aspx)\]

## More in Agile

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

- Jul 9, 2006

    ### [TypeMock 3.5 is out - and it's powerful!](https://osherove.com/blog/2006/7/9/typemock-35-is-out-and-its-powerful.html)

- Jun 29, 2006

    ### [See you at Agile Israel today!](https://osherove.com/blog/2006/6/29/see-you-at-agile-israel-today.html)

- Jun 13, 2006

    ### [June @ Agile Israel (Feature Driven Development, Design For Testability)](https://osherove.com/blog/2006/6/13/june-agile-israel-feature-driven-development-design-for-test.html)

- Jun 11, 2006

    ### [Architecting in an Agile World - My ArcCast with Ron Jabobs in online](https://osherove.com/blog/2006/6/11/architecting-in-an-agile-world-my-arccast-with-ron-jabobs-in.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/
