Behaviour Driven Development (BDD) enhanced with ScopeMaster

An overview of BDD

BDD is a development methodology (and tooling) designed to improve the communication between business and software technical community, in particular it addresses the challenge of simplifying scenario testing.

The foundation behind BDD is the Gherkin feature file. The feature file has a predefined structure and syntax yet can be written in clear, understandable business language.  This helps reduce the communication challenges between business and technical staff.

Consider this example BDD Gherkin Feature file From Hiptest:

Feature: Account Holder withdraws cash
Scenario: Account has sufficient funds
Given the account balance is $100
And the card is valid
And the machine contains enough money
When the Account Holder requests $20
Then the ATM should dispense $20
And the account balance should be $80
And the card should be returned

The Gherkin syntax focuses on a rigorous, but understandable structure for the scenarios under which the feature should be tested.  Developer BDD tools then parse these feature files to generate testing code/structures from the scenarios of Given, When and Then.

The combination of easy-to-understand syntax and the automated parsing of this files to generate automated functional test structures is a very effective combination to facilitate the rapid coding of business requirements.

Here’s another example (from Behat) :

Feature: Serve coffee
In order to earn money
Customers should be able to
buy coffee at all times

Scenario: Buy last coffee
Given there are 1 coffees left in the machine
And I have deposited 1 dollar
When I press the coffee button
Then I should be served a coffee

Tools such as Cucumber, Behat, JBehave and Jasmine will parse the feature files to create test structures so that developers can easily create automated functional tests.  Froglogic’s Squish and Hiptest extend these scenario testing capabilities even further.  However, they all focus on the scenarios or the how and when of a user story doing what.

The quality of the story itself, in particular the who and what of the user story are not examined by these tools.  In fact, with BDD you can have well written scenarios with fully automated tests but a nonsense user story  (feature description).  This is where ScopeMaster comes in.

ScopeMaster is quite different from these BDD tools.  It is principally used by analysts, not developers, for automating the analysis of the who and what within and across user stories.  No coding knowledge is required.  In fact by using ScopeMaster whilst collating and grooming the stories, before compiling the scenarios, you will end up with better stories and avoid wasted effort on creating scenarios that may not be necessary.

Both is best

ScopeMaster is an ideal complimentary tool in BDD.  The most productive scenario is to refine the user stories first with ScopeMaster, before the scenarios have all been written.   Then get to work on the scenarios and use  these other great tools to build up the behavioural tests.  The combination of both can take BDD to a whole new level in development productivity and quality.