Sunday, September 2, 2007

Behavior Driven Development

I learned about Behavior Driven Development from Chris Matts. It is basically a way to utilize some of the principles of Test Driven Development for analysis. All in all it is really quite elegant in its simplicity.

Dan North describes Behavior Driven Development in this article. Basically it suggests the use of the following pattern for recording requirements:

AS A [person or role]
I WANT [some feature]
SO THAT [business value of the feature]


To provide further detail, and prepare for testing, acceptance tests for the feature can be written in terms of expected behavior:

GIVEN [some initial context]
WHEN [an event occurs]
THEN [ensure some outcome]

Powerful stuff when you understand the why behind it.

0 comments: