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 instinctsYou can defend why your suite is shaped like a pyramid, a trophy, or a honeycomb.
- Locator disciplineYou rank selector strategies by stability and explain when to break the rule.
- Flaky test ownershipYou debug to a structural fix instead of retry-until-green.
- Parallelisation literacyYou know how your framework isolates state, fixtures, and database access across workers.