Behavior-Driven Development Framework
Posted by Marcus Wyatt on 29 August 2006
Test-Driven Development has jumped the chasm to general acceptance. This is a good thing, but like Dave said in the Google video he presented, there are still a high percentage of people who practices Test-Driven Development badly.
So what is the difference?
In my opinion, most people think that Test-Driven Development is about Testing. When you explain that Test-Driven Development is really at its hart a design process, they squawk at you and give you a look like you have lost your mind.
I see Test-Driven Development performing the following roles:
- Design process
- Behavior Specification
- Requirements Capturing
- Regression Test Suite
Here is an example of a Specification for a calculation domain object class:
[ Functionality() ]
public class Calculation
int one = 1;
int two = 2;
[ Specification() ]
public void OnePlusOneMustEqualTwo()
Specify.That( one + one ).Must.Equal( two );
Specify.That( two ).Must.Be.GreaterThan( one );
Specify.That( two ).Must.Not.Equal( one );
If you would like to get a alpha release of the NSpecify.Framework and a NUnit install that integrates with NSpecify. You can download the framework and NUnit 2.2.8(.NET 2) or NUnit 2.4 Beta 1 (.NET 2) install.
tags: bdd, development, tdd
Currently listening to: Sea (PFM Mix) – Winamp *** 96. 10 – Saint Etienne – The Sea (PFM Mix)