Cucumber interview questions — Hard
100 hard-level Cucumber questions from our Automation Testing bank, each with the correct answer and an explanation of why it is correct.
This topic slice is available to practise but is not yet part of our indexed set.
What this covers
Cucumber appears throughout Automation Testing interviews. At hard level, interviewers are typically checking depth under pressure — edge cases, failure modes, performance characteristics, and the trade-offs you accepted. Work through these, then explain your answer out loud; the second part is what interviews actually test.
4 example questions
1. Regarding Cucumber, which of the following is a false statement?
- A. When steps are used for assertions and Then steps for actions.correct
- B. BDD aims to create a shared understanding among business, developers, and testers.
- C. Step definitions bind Gherkin steps to executable automation code.
- D. Data Tables pass structured tabular data into a single step.
Why: The selected statement is false. The other options are accurate statements about Cucumber.
2. Identify the INCORRECT statement about Cucumber:
- A. Background steps run only before the first scenario in a feature.correct
- B. A Background section defines steps that run before every scenario in a feature.
- C. The And and But keywords continue the previous Given/When/Then step type.
- D. Hooks (@Before/@After) run around scenarios for setup and cleanup.
Why: The selected statement is false. The other options are accurate statements about Cucumber.
3. Which statement about Cucumber is NOT correct?
- A. Data Tables pass structured tabular data into a single step.
- B. Step definitions bind Gherkin steps to executable automation code.
- C. Background steps run only before the first scenario in a feature.correct
- D. Gherkin scenarios use Given-When-Then to describe behavior in business-readable language.
Why: The selected statement is false. The other options are accurate statements about Cucumber.
4. Which of the following statements about Cucumber is FALSE?
- A. Tags like @smoke can filter which scenarios execute.
- B. Scenario Outline with an Examples table runs the same scenario with multiple data rows.
- C. Hooks (@Before/@After) run around scenarios for setup and cleanup.
- D. Cucumber can only be used with the Java programming language.correct
Why: The selected statement is false. The other options are accurate statements about Cucumber.