BDD/Cucumber: when it pays off and when it doesn't
BDD (Behaviour-Driven Development) is fundamentally a collaboration practice, not a tool. That's the most misunderstood part of the topic and the place where interview answers separate.
At its centre is the three amigos conversation: business (what do we need?), developer (how do we build it?), QA (what could go wrong?) — all three discussing the requirement through examples before code is written. The value lies in catching misunderstandings early: what does "the coupon is used" mean — once overall, or once per user? That question costs two minutes at the start of a sprint and two days at the end.
Gherkin (Given/When/Then) is a format for writing down the result of that conversation. Cucumber is the tool that turns Gherkin into executable tests.
A critical nuance follows: you can do BDD without Cucumber (hold the three amigos conversations and write the tests in plain code — an approach that works very well in practice), and you can use Cucumber without BDD (bolting a Gherkin layer onto existing code without talking to anyone — the worst variant: all the cost, none of the benefit).
Let's be honest about the cost. Cucumber adds an extra layer of abstraction, and it carries a price:
- Double maintenance — every change touches both the
.featurefile and the step definition - Managing step definitions — over time you accumulate 300 steps like "I click the button"; finding what already exists gets hard and duplicates appear
- Harder debugging — the failure shows on a Gherkin line while the cause sits deep in a step definition; the stack trace grows a layer
- Harder refactoring — the IDE's "rename" and "find usages" work poorly across text strings
- New team members must learn two things: Playwright and the Cucumber layer
This cost pays for itself in exactly one case: non-technical stakeholders GENUINELY read, write and discuss the Gherkin scenarios. If only QA ever opens the .feature files, the layer is pure overhead — writing tests in plain TypeScript is both more readable and faster.
Readability in Playwright without Cucumber: a test.describe block gives you the feature, a clear test name gives the scenario, and test.step() gives the steps. The result is nearly as readable with one layer less abstraction. When Cucumber genuinely is needed, the playwright-bdd package runs Gherkin on top of the Playwright test runner — keeping parallelism, fixtures and traces (classic @cucumber/cucumber loses some of these).
| Situation | Does Cucumber pay off? | Why |
|---|---|---|
| A business analyst writes and reviews the scenarios | Yes | The communication gain covers the extra layer's cost |
| A regulated domain: requirement ↔ test traceability is required | Yes | Scenarios double as audit-suitable documentation |
| Only the QA team ever opens the .feature files | No | All of the cost, none of the communication gain |
| Technical tests: API contracts, error codes | No | Gherkin is a clumsy way to express technical detail |
| A small team iterating fast | Usually no | The extra layer slows you down and there's no audience |
| Complex business rules with many variations | Maybe | Scenario Outline tables make the rules legible |
This question is a trap in interviews: "what do you think about BDD?" Both the enthusiastic "it's great, everyone should use it" and the dismissive "it's a waste of time" are weak. The strong answer has three parts: (1) BDD is a collaboration practice, not a tool — Cucumber is only one implementation of it; (2) the real value is in the three amigos conversation, not in Gherkin syntax; (3) the condition: if non-technical people don't read the scenarios, the layer doesn't justify itself. Those three sentences show genuine understanding.
📚 Sources and documentation
- Gherkin referenceofficialcucumber.io
- playwright-bddgithub.com