---
title: "BDD: Behavior vs. Spec Frameworks"
url: "https://osherove.com/blog/2008/10/4/bdd-behavior-vs-spec-frameworks.md"
canonical: "https://osherove.com/blog/2008/10/4/bdd-behavior-vs-spec-frameworks.html"
published: "2008-10-04T14:49:01"
updated: "2008-10-04T14:49:01"
tags: [".NET", "Agile", "BDD"]
author: "Roy Osherove"
description: "In my search to understand a little more about BDD and BDD frameworks, one gem that I gleaned is that there is an important distinction between “Spec” and “Behavior” frameworks. “Spec” is intended for the unit level…"
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/"
---

# BDD: Behavior vs. Spec Frameworks

By Roy Osherove October 4, 2008 In [.NET](https://osherove.com/blog/category/net), [Agile](https://osherove.com/blog/category/agile), [BDD](https://osherove.com/blog/category/bdd)

**Historical article** · Originally published October 4, 2008; technical details may be outdated.

In my search to understand a little more about BDD and BDD frameworks, one gem that I gleaned is that there is an important distinction between “Spec” and “Behavior” frameworks. “Spec” is intended for the unit level granularity (like unit tests) and “Behavior” is intended to relay user stories at the application level.

This makes sense to me because in all the BDD discussions I’ve seen I had a hard time understanding why you want to put an application level story on top of a unit level story. it just didn’t make sense.

So here’s what I get so far (correct me):

**I can use Behavior Frameworks** to create stories that use the same shared language that my customer would understand, at the application level use cases. Most frameworks that support this allow you to “code” this up which still has a lot of friction for most people to read so it’s a problem.

**I can use Spec Frameworks** to replace the language I use in my current unit tests so that instead of “testing” I am defining “behavior” of a component at the unit level. this is usually almost a purely syntactical change in nature.

Some Frameworks have APIs for both Specs and Behaviors (like RSpec). Some only have APIs for one of them (which ones?)

## Lessons on this topic

- [Continuous Tests](https://courses.osherove.com/courses/tdd-and-bdd-in-ruby/continuous-tests/) · TDD and BDD in Ruby
- [Acceptance Tests with Cucumber](https://courses.osherove.com/courses/tdd-and-bdd-in-ruby/acceptance-tests-with-cucumber/) · TDD and BDD in Ruby
- [Unit Testing And TDD 101](https://courses.osherove.com/courses/the-art-of-unit-testing-and-tdd-master-class-in-net/unit-testing-and-tdd-101/) · The Art of Unit Testing & TDD Master Class in .NET
- [Day 1 Intro](https://courses.osherove.com/courses/tdd-and-bdd-in-ruby/day-1-intro/) · TDD and BDD in Ruby
- [Iteration Zero and Continuous Delivery](https://courses.osherove.com/courses/tdd-and-bdd-in-ruby/iteration-zero-and-continuous-delivery/) · TDD and BDD in Ruby

## More in .NET

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

- Oct 6, 2008

    ### [Deadlock Challenge](https://osherove.com/blog/2008/10/6/deadlock-challenge.html)

- Oct 4, 2008

    ### [Isolator feature focus: Recursive Fakes](https://osherove.com/blog/2008/10/4/isolator-feature-focus-recursive-fakes.html)

- Oct 3, 2008

    ### [Agile Testing tools List](https://osherove.com/blog/2008/10/3/agile-testing-tools-list.html)

- Oct 1, 2008

    ### [Isolator feature focus: Live objects in unit tests](https://osherove.com/blog/2008/10/1/isolator-feature-focus-live-objects-in-unit-tests.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/
