What are the most common Cucumber / BDD anti-patterns to avoid?
Our feature files read like UI scripts. Where did we go wrong?
cucumberbddanti-patterns
Our feature files read like UI scripts. Where did we go wrong?
Accepted solution
Top offenders: (1) UI-scripted steps ("I click #submit-btn") instead of behavior ("I place my order") — makes features unreadable and brittle. (2) Scenarios that share state via static globals. (3) One giant scenario doing 40 steps. (4) Feature files written after the code, by the developer, alone — that is not BDD, that is test code with extra syntax. Rewrite steps in business language and split into small, independent scenarios.