In this second part of this series, we look at creating a first scenario and step definitions.
As a natural extension of Test Driven Development (TDD), BDD takes things a stage further.
TDD focuses on the use of Unit Tests to drive out a specification for your code and to guide your development. The nature of unit tests means that they are mainly practical for use by developers and, as the name suggests, only for unit testing.
Among other things BDD answers the following questions:
In BDD we describe testing scenarios in the Gherkin language, which looks a lot more like normal english than unit test code. Those test scenarios are then used to automatically build ‘step definitions’, which is the scaffolding code for our testing. We can then use unit test code within that framework to guide our development.
(credit: Tao of BDD)
Part 2 coming soon.