Search The Blog
My Books

New:

My Songs

 

The Art of Unit Testing

Buy PDF or Print book at Manning

Buy on Amazon

Latest Posts
from 5whys.com
Twitter: @RoyOsherove
About this site

TDD in .NET Online Course

TDD and BDD in Ruby Online Course

 

Subscribe!

This site aims to connect all the dots of my online activities - from tools, books blogs and twitter accounts, to upcoming conferences, engagements and user group talks.

« Isolator feature focus: Recursive Fakes | Main | Agile Testing tools List »
Saturday
Oct042008

BDD: Behavior vs. Spec Frameworks

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?)

PrintView Printer Friendly Version

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
Web Analytics