Acceptance Frameworks Vs. Specification APis
Historical article · Originally published March 29, 2013; technical details may be outdated.
I see two forms of ‘BDD’ tools floating in the wild.
The first form, let`s call it ‘deep BDD’ for now, requires you to go through a special langauge filter, before translating it with special adapters into executable specifications. Think Cucumber’s Gherkin forcing you to write adapters in code to execute your tests. Or SpecFlow’s Gherkin with .NET step definitions.
The second form, let’s call it ‘shallow BDD’ are tools that only give you an API to develop with, but no natural language interface to discuss with end users, or for giving end users to edit on their own. Think RSpec, MSpec or NSpec – they are literally just libraries that allow you to write your “tests” in a more BDD like API.
Deep BDD tools give you more permission to get out of your comfort zone and talk to a customer, while shallow BDD tools give you more permission to stay in side your comfort zone – your code, and to just stay with yourself, coding into the night, not having to talk to anybody, still feeling you’re awesome because you are dong ‘BDD’.
In that way, shallow bdd tools are just shiny wrappers on unit testing tools, while deep BDD tools make us work harder for communication.
Lessons on this topic
- Acceptance Tests with Cucumber · TDD and BDD in Ruby
- Summary · TDD and BDD in Ruby
- Advanced RSpec and Cleaning Up The Specs · TDD and BDD in Ruby
- Continuous Delivery with TeamCity · TDD and BDD in Ruby
- Day 1 Intro · TDD and BDD in Ruby