I’ve been reading up on behaviour driven development (BDD) and wanted to see how other teams actually use it.
The basic idea is simple. Developers, testers and business people agree on how a feature should behave before anyone writes code. They write that behavior down as plain-language examples, usually in a Given-When-Then format, like:
Given a user has items in their cart
When they apply a valid coupon
Then the total should show the discount
Those examples then become automated tests, so the spec and the tests stay the same thing.
This glossary page explains it well if anyone wants a quick overview: Behaviour Driven Development explained
I’m curious about a few things:
- Do you write scenarios before development starts, or after?
- Which tool do you use: Cucumber, SpecFlow, Behave, or something else?
- Has it really improved communication with the business side, or has it turned into extra paperwork?
Would like to hear what has worked for you and what hasn’t.