Questions
How do you keep behavior driven development scenarios from turning into brittle UI scripts?
Our team started using behavior driven development about six months ago, mostly following the Given, When, Then approach described in this behavior driven development overview. The early results were good. Product and QA started reviewing scenarios before sprint planning, and we caught a few requirement gaps before any code was written.
The problem now is maintenance. A lot of our scenarios have drifted toward describing implementation steps, like "When the user clicks the Submit button on the checkout page" instead of describing the actual behavior. Every small UI change breaks a handful of scenarios, and developers are starting to see the feature files as overhead rather than documentation.
A few things I'm trying to figure out:
- How do you decide what level of detail belongs in a scenario versus the step definitions?
- Do you run regular reviews to clean up outdated scenarios, or do they get updated only when they fail?
- For API-heavy features, do you write BDD scenarios at the API level instead of the UI level?
Would appreciate hearing how other teams have handled this as their scenario count grew.
