Cucumber interview questions — Easy
98 easy-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 easy level, interviewers are typically checking that you know the fundamentals and can describe them precisely — definitions, defaults, and the basic mechanics. Work through these, then explain your answer out loud; the second part is what interviews actually test.
20 example questions
1. In Cucumber, what does cucumber expression {string} do or refer to?
- A. Table of values consumed by a Scenario Outline.
- B. Parameter placeholder capturing quoted text into a step argument.correct
- C. Step establishing the initial context or preconditions.
- D. Mode verifying every step has a matching definition without executing.
Why: cucumber expression {string}: Parameter placeholder capturing quoted text into a step argument.
2. In the context of Cucumber, living documentation is best described as:
- A. Reports generated from features that stay in sync with behavior.correct
- B. Table of values consumed by a Scenario Outline.
- C. Configuration pointing Cucumber to step definition packages.
- D. Step establishing the initial context or preconditions.
Why: living documentation: Reports generated from features that stay in sync with behavior.
3. What is the purpose of cucumber expression {string} in Cucumber?
- A. Parameter placeholder capturing quoted text into a step argument.correct
- B. Top-level Gherkin keyword describing the capability under test.
- C. Table of values consumed by a Scenario Outline.
- D. Reports generated from features that stay in sync with behavior.
Why: cucumber expression {string}: Parameter placeholder capturing quoted text into a step argument.
4. Which of the following best describes living documentation in Cucumber?
- A. Table of values consumed by a Scenario Outline.
- B. Parameter placeholder capturing quoted text into a step argument.
- C. Step establishing the initial context or preconditions.
- D. Reports generated from features that stay in sync with behavior.correct
Why: living documentation: Reports generated from features that stay in sync with behavior.
5. What is the purpose of living documentation in Cucumber?
- A. Table of values consumed by a Scenario Outline.
- B. Top-level Gherkin keyword describing the capability under test.
- C. Step establishing the initial context or preconditions.
- D. Reports generated from features that stay in sync with behavior.correct
Why: living documentation: Reports generated from features that stay in sync with behavior.
6. In Cucumber, what does Given do or refer to?
- A. Table of values consumed by a Scenario Outline.
- B. Configuration pointing Cucumber to step definition packages.
- C. Step establishing the initial context or preconditions.correct
- D. Reports generated from features that stay in sync with behavior.
Why: Given: Step establishing the initial context or preconditions.
7. In Cucumber, what does living documentation do or refer to?
- A. Parameter placeholder capturing quoted text into a step argument.
- B. Step asserting the expected observable outcome.
- C. Reports generated from features that stay in sync with behavior.correct
- D. Configuration pointing Cucumber to step definition packages.
Why: living documentation: Reports generated from features that stay in sync with behavior.
8. In Cucumber, what does dry-run do or refer to?
- A. Step asserting the expected observable outcome.
- B. Top-level Gherkin keyword describing the capability under test.
- C. Step establishing the initial context or preconditions.
- D. Mode verifying every step has a matching definition without executing.correct
Why: dry-run: Mode verifying every step has a matching definition without executing.
9. Which of the following best describes dry-run in Cucumber?
- A. Mode verifying every step has a matching definition without executing.correct
- B. Step establishing the initial context or preconditions.
- C. Step asserting the expected observable outcome.
- D. Table of values consumed by a Scenario Outline.
Why: dry-run: Mode verifying every step has a matching definition without executing.
10. Which of the following best describes Given in Cucumber?
- A. Configuration pointing Cucumber to step definition packages.
- B. Table of values consumed by a Scenario Outline.
- C. Top-level Gherkin keyword describing the capability under test.
- D. Step establishing the initial context or preconditions.correct
Why: Given: Step establishing the initial context or preconditions.
11. What is the purpose of dry-run in Cucumber?
- A. Configuration pointing Cucumber to step definition packages.
- B. Mode verifying every step has a matching definition without executing.correct
- C. Reports generated from features that stay in sync with behavior.
- D. Parameter placeholder capturing quoted text into a step argument.
Why: dry-run: Mode verifying every step has a matching definition without executing.
12. Which of the following best describes Feature in Cucumber?
- A. Top-level Gherkin keyword describing the capability under test.correct
- B. Table of values consumed by a Scenario Outline.
- C. Step establishing the initial context or preconditions.
- D. Step asserting the expected observable outcome.
Why: Feature: Top-level Gherkin keyword describing the capability under test.
13. In Cucumber, what does glue do or refer to?
- A. Table of values consumed by a Scenario Outline.
- B. Step establishing the initial context or preconditions.
- C. Step asserting the expected observable outcome.
- D. Configuration pointing Cucumber to step definition packages.correct
Why: glue: Configuration pointing Cucumber to step definition packages.
14. In Cucumber, what does Feature do or refer to?
- A. Step asserting the expected observable outcome.
- B. Step establishing the initial context or preconditions.
- C. Mode verifying every step has a matching definition without executing.
- D. Top-level Gherkin keyword describing the capability under test.correct
Why: Feature: Top-level Gherkin keyword describing the capability under test.
15. What is the purpose of Given in Cucumber?
- A. Step asserting the expected observable outcome.
- B. Step establishing the initial context or preconditions.correct
- C. Parameter placeholder capturing quoted text into a step argument.
- D. Mode verifying every step has a matching definition without executing.
Why: Given: Step establishing the initial context or preconditions.
16. What is the purpose of glue in Cucumber?
- A. Reports generated from features that stay in sync with behavior.
- B. Parameter placeholder capturing quoted text into a step argument.
- C. Configuration pointing Cucumber to step definition packages.correct
- D. Top-level Gherkin keyword describing the capability under test.
Why: glue: Configuration pointing Cucumber to step definition packages.
17. Which of the following best describes glue in Cucumber?
- A. Configuration pointing Cucumber to step definition packages.correct
- B. Reports generated from features that stay in sync with behavior.
- C. Step asserting the expected observable outcome.
- D. Top-level Gherkin keyword describing the capability under test.
Why: glue: Configuration pointing Cucumber to step definition packages.
18. What is the purpose of Feature in Cucumber?
- A. Configuration pointing Cucumber to step definition packages.
- B. Mode verifying every step has a matching definition without executing.
- C. Table of values consumed by a Scenario Outline.
- D. Top-level Gherkin keyword describing the capability under test.correct
Why: Feature: Top-level Gherkin keyword describing the capability under test.
19. Which of the following best describes Then in Cucumber?
- A. Step asserting the expected observable outcome.correct
- B. Table of values consumed by a Scenario Outline.
- C. Configuration pointing Cucumber to step definition packages.
- D. Top-level Gherkin keyword describing the capability under test.
Why: Then: Step asserting the expected observable outcome.
20. Which of the following best describes Examples in Cucumber?
- A. Configuration pointing Cucumber to step definition packages.
- B. Table of values consumed by a Scenario Outline.correct
- C. Step establishing the initial context or preconditions.
- D. Mode verifying every step has a matching definition without executing.
Why: Examples: Table of values consumed by a Scenario Outline.