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. Step definitions bind Gherkin steps to executable automation code.
- B. Gherkin feature files contain the automation code itself.correct
- C. A Background section defines steps that run before every scenario in a feature.
- D. Scenario Outline with an Examples table runs the same scenario with multiple data rows.
Why: The selected statement is false. The other options are accurate statements about Cucumber.
2. Which statement about Cucumber is NOT correct?
- A. Gherkin feature files contain the automation code itself.correct
- B. Hooks (@Before/@After) run around scenarios for setup and cleanup.
- C. The And and But keywords continue the previous Given/When/Then step type.
- D. A Background section defines steps that run before every scenario in a feature.
Why: The selected statement is false. The other options are accurate statements about Cucumber.
3. Identify the INCORRECT statement about Cucumber:
- A. A Background section defines steps that run before every scenario in a feature.
- B. Hooks (@Before/@After) run around scenarios for setup and cleanup.
- C. Gherkin feature files contain the automation code itself.correct
- D. The And and But keywords continue the previous Given/When/Then step type.
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. Gherkin feature files contain the automation code itself.correct
- B. Gherkin scenarios use Given-When-Then to describe behavior in business-readable language.
- C. Scenario Outline with an Examples table runs the same scenario with multiple data rows.
- D. The And and But keywords continue the previous Given/When/Then step type.
Why: The selected statement is false. The other options are accurate statements about Cucumber.