Skip to main content

What is BDD (Behavior-Driven Development) and how does Cucumber fit into test automation?

  • BDD
  • Cucumber
  • Gherkin

Answer it first, then compare. Nothing here is saved or scored.

Model answer

BDD uses natural-language scenarios (Given/When/Then) to describe expected behavior before writing code. Cucumber maps these Gherkin scenarios to step definitions (code). Benefits: shared language between QA, devs, and PMs; living documentation. Drawbacks: extra abstraction layer, step definition maintenance, and Gherkin can become a bottleneck if overused. Best for acceptance tests where non-technical stakeholders need to understand scenarios. Don't force all tests into BDD.

What interviewers listen for

  • Test architecture instincts
    You can defend why your suite is shaped like a pyramid, a trophy, or a honeycomb.
  • Locator discipline
    You rank selector strategies by stability and explain when to break the rule.
  • Flaky test ownership
    You debug to a structural fix instead of retry-until-green.
  • Parallelisation literacy
    You know how your framework isolates state, fixtures, and database access across workers.

Terms to know

See all 35 automation questions

Written by , Senior QA Automation Engineer, 50+ QA candidate interviews conductedLast updated July 2026