---
title: "BDD and Cucumber: When Gherkin Scenarios Help and When They Hurt"
description: "The benefits of behaviour-driven development and Gherkin scenarios with Cucumber, the common traps, what makes a good scenario, and when BDD is worth it."
url: https://sanderyaz.com/en/blog/bdd-cucumber-pros-and-cons/
author: Sander Yazıcıoğlu
date: 2026-12-02
updated: 2026-12-02
lang: en
tags: ["Test automation","BDD","QA","Agile"]
---

# BDD and Cucumber: When Gherkin Scenarios Help and When They Hurt

Working on test automation platforms, BDD was one of the most debated topics: some teams had built a great shared language with the business through Gherkin, others were drowning in hundreds of "Given-When-Then" files nobody read. The difference wasn't the tool; it was how it was used.

## BDD isn't really a testing tool

Behaviour-Driven Development means **the business, developers and testers talking through examples before a feature is built**. Cucumber and Gherkin turn the output of that conversation into something executable. Without the conversation, Gherkin is just an extra layer on top of test code.

## A good scenario

```gherkin
Feature: Cancelling a test run

  Scenario: A running test run is cancelled by the user
    Given I have a test run in progress on a "Pixel 8"
    When I cancel the run
    Then the run status is "Cancelled"
    And the device becomes available again within 30 seconds
```

What makes it good:

- **Business language:** no UI details like "click the button" or "find the element with id x".
- **One behaviour:** the scenario describes one rule.
- **Concrete examples:** "Pixel 8" rather than "a device", "30 seconds" rather than "quickly".
- **Short:** 3–7 steps. Long scenarios usually mix several behaviours.

## A bad scenario

```gherkin
Given I open the login page
And I type "test@example.com" into the "email" field
And I type "123456" into the "password" field
And I click the "Login" button
And I wait 3 seconds
...
```

This isn't a scenario; it's a test script translated into English. It breaks whenever the UI changes, means nothing to the business, and step definitions multiply out of control.

## Benefits

- **A shared language:** "what happens when a run is cancelled?" gets answered before any code is written, and misunderstandings surface early.
- **Living documentation:** scenarios run on every build, so they stay current.
- **Acceptance criteria:** the "done" definition of a user story becomes concrete.

## Common traps

1. **Only QA writes scenarios:** without the shared conversation, BDD's main benefit disappears.
2. **Step definition explosion:** hundreds of similar but differently worded steps. Keep a step glossary and prefer parameterised steps.
3. **Testing everything through the UI:** a Gherkin scenario can run against an API or service layer too. Verify behaviour at the cheapest layer; I describe the test pyramid in the [mobile test automation strategy](/en/blog/mobile-test-automation-strategy/).
4. **Scenarios that depend on each other:** each scenario should set itself up with its own `Given` steps.

## When is it worth it?

| Situation | BDD / Cucumber |
|---|---|
| Complex business rules, business actively involved | Great fit |
| Regulation, audits, acceptance documents required | Good fit |
| Technical team writing tests for itself, no other readers | Unneeded layer |
| Small, fast-changing prototype | A burden |

## Conclusion

BDD's value isn't in the Gherkin files but in the conversation that produces them. Short scenarios written with the business, in business language, create a strong shared language; UI scripts written by QA alone turn into maintenance debt.

---

About the author: [Sander Yazıcıoğlu](https://sanderyaz.com/en/about/). Sander Yazıcıoğlu is a Senior Full-Stack Developer in Istanbul. At LiveTesting he builds the backend, frontend, realtime systems and Appium automation of a real-device testing platform; before that he built enterprise Angular apps at Testinium and Loadium.
