---
title: 'Knowledge check | BDD with Cucumber: Gherkin to CI'
description: Ten questions on the decisions this course made and why. Each answer
  explains the reasoning once you check. 1. A manager asks the team to &quot;do BDD&quot;…
source_url:
  html: https://testingbot.com/resources/courses/cucumber-bdd/knowledge-check
  md: https://testingbot.com/resources/courses/cucumber-bdd/knowledge-check.md
---

Course

[BDD with Cucumber: Gherkin to CI](https://testingbot.com/resources/courses/cucumber-bdd)

Chapter 12 of 12

1. [1 Cucumber BDD Tutorial: From Gherkin to CI](https://testingbot.com/resources/courses/cucumber-bdd)
2. [2 BDD Testing Starts Before the Code: Three Amigos](https://testingbot.com/resources/courses/cucumber-bdd/bdd-collaboration)
3. [3 Writing Good Gherkin: Declarative Scenarios](https://testingbot.com/resources/courses/cucumber-bdd/writing-good-gherkin)
4. [4 Cucumber with Java and Selenium: First Scenario](https://testingbot.com/resources/courses/cucumber-bdd/cucumber-java-selenium)
5. [5 Step Definitions, Cucumber Expressions, Parameter Types](https://testingbot.com/resources/courses/cucumber-bdd/step-definitions)
6. [6 Hooks and Sharing State with PicoContainer](https://testingbot.com/resources/courses/cucumber-bdd/hooks-and-shared-state)
7. [7 Scenario Outlines, Tags and Background](https://testingbot.com/resources/courses/cucumber-bdd/outlines-tags-background)
8. [8 Cucumber-JS with Playwright](https://testingbot.com/resources/courses/cucumber-bdd/cucumber-js-playwright)
9. [9 Parallel Runs, Reports and CI on TestingBot](https://testingbot.com/resources/courses/cucumber-bdd/parallel-reports-ci)
10. [10 Other BDD Frameworks: Behave and Reqnroll](https://testingbot.com/resources/courses/cucumber-bdd/behave-and-reqnroll)
11. [11 BDD Anti-Patterns and How to Fix Them](https://testingbot.com/resources/courses/cucumber-bdd/bdd-anti-patterns)
12. [12 Knowledge check](https://testingbot.com/resources/courses/cucumber-bdd/knowledge-check)

[Exit course](https://testingbot.com/resources/courses)

 Chapter 12 of 12 Intermediate 6 min read Updated Nov 2026 

# Knowledge check

Ten questions on the decisions this course made and why. Each answer explains the reasoning once you check.

1. A manager asks the team to "do BDD" by installing Cucumber and converting the existing Selenium tests to feature files. What is the most important thing missing from that plan?

 A Cucumber reporting plugin. Discovery: business, development and testing agreeing on concrete examples before the code is written. Scenario Outlines for every test.

BDD is a collaboration practice; Cucumber only automates its output. Converting existing tests adds a layer of Gherkin without the conversations that make it valuable.

2. During example mapping, one rule card has eight examples under it and three red cards beside it. What does that suggest?

 The rule is well understood and ready to build. The examples should become eight Background steps. The rule is complex and not yet understood; it may need its own story and answers to the questions first.

Many examples signal complexity, and red cards signal unknowns. Both are reasons to slow down before building, which is exactly what the map is for.

3. Which step is written declaratively?

 `When Ana renews her subscription` `When I click the "Renew" button in the ".plan-card" panel` `When I go to "/account/billing" and press Enter`

The declarative step names the behaviour and would stay true for a mobile app or an API. The others describe one particular UI and break when it changes.

4. A new Cucumber-JVM 8 project fails at start-up with "Cucumber needs a JSON library to write reports". Which dependency is missing?

 `cucumber-picocontainer` `junit-platform-suite` `cucumber-testng` `jackson-databind` (Jackson 3 or 2)

Jackson became opt-in in Cucumber-JVM 8, and reports that serialise Cucumber's messages need it. The other modules have nothing to do with JSON.

5. A scenario says `Then the sign-in is rejected because the pasword is invalid` (typo). The step definition uses a `{field}` parameter type matching `username|password`. What happens?

 The step runs with `field` set to "pasword" and the assertion fails. The step is undefined, so the scenario fails before anything is asserted. Cucumber corrects the spelling.

A parameter type's regular expression decides what matches. "pasword" matches neither alternative, so no step definition matches and Cucumber reports an undefined step with a snippet.

6. With `cucumber-picocontainer`, `SignInSteps` and `Hooks` both take a `Browser` in their constructor. How many `Browser` objects exist during one scenario?

 Two, one per class. One for the whole test run. One per scenario, shared by every class that asks for it.

PicoContainer creates each requested class once per scenario and injects the same instance everywhere, then discards it. That is what makes sharing within a scenario and isolation between scenarios work together.

7. A feature's Background has seven steps, and two of the five scenarios do not need three of them. What should you do?

 Keep only the context every scenario needs in the Background, and move the rest into the scenarios (or split the feature). Leave it; extra setup does no harm. Convert the Background into a Scenario Outline.

A Background is read as true for every scenario. Steps that some scenarios do not need mislead the reader and slow every scenario down.

8. In Cucumber-JS, why are step definitions written as `async function () {}` rather than arrow functions?

 Arrow functions cannot be `async`. Cucumber-JS passes the World as `this`, and arrow functions do not get their own `this`. Arrow functions run in parallel.

The World holds the page and browser for the scenario and is bound to `this`. An arrow function keeps the surrounding `this`, which is undefined in an ES module.

9. You want the same scenarios on Chrome and Firefox on TestingBot, grouped together in the dashboard. What is the cleanest approach?

 Duplicate the feature files with `@chrome` and `@firefox` tags. Put both browsers in one `tb:options` map. Write a Scenario Outline with a browser column. Run the suite once per browser (for example as a CI matrix), passing the browser as a system property and the same `build` name to every run.

The browser is a property of the run, not of the behaviour. One invocation per browser keeps the feature files clean, and a shared build name groups the sessions.

10. A .NET team asks whether to start a new BDD project on SpecFlow. What do you tell them?

 Yes; SpecFlow is still the standard and actively maintained. Use Behave, because it is the .NET port of Cucumber. Use Reqnroll: SpecFlow reached end of life on 31 December 2024, and Reqnroll is the maintained fork of its codebase.

SpecFlow still installs from NuGet but receives no fixes. Reqnroll continues the same model and supports Cucumber expressions. Behave is a Python tool.

Check answers

## Where to go next[#](https://testingbot.com#where-to-go-next)

You can now run discovery sessions, write Gherkin that the business can read, and automate it with Cucumber-JVM, Cucumber-JS, Behave or Reqnroll on a cloud grid with reports and CI. Good next steps:

- The [Page Object Model course](https://testingbot.com/resources/courses/page-object-model) for the layer between step definitions and the browser.
- The [flaky tests course](https://testingbot.com/resources/courses/flaky-tests) when scenarios start failing intermittently.
- The [cross-browser testing course](https://testingbot.com/resources/courses/cross-browser-testing) to decide which browsers your scenarios should run on.
- The TestingBot docs for [TestNG and Cucumber](https://testingbot.com/support/web-automate/selenium/java/testng-cucumber), [Behave](https://testingbot.com/support/web-automate/selenium/python/behave) and [Reqnroll](https://testingbot.com/support/web-automate/selenium/csharp/reqnroll) as a reference for capabilities and options.

When your suite runs green on TestingBot, the [certification](https://testingbot.com/resources/courses/cucumber-bdd/certification) is one exam away.

[Previous · Chapter 11 BDD Anti-Patterns and How to Fix Them](https://testingbot.com/resources/courses/cucumber-bdd/bdd-anti-patterns)
## You finished BDD with Cucumber: Gherkin to CI

Put what you learned into practice. Run your tests on 6100+ real browsers and physical iOS and Android devices.

[Start free trial](https://testingbot.com/users/sign_up) [See pricing](https://testingbot.com/pricing) [Browse other courses](https://testingbot.com/resources/courses)

## TestingBot Cucumber BDD Certification

Turn this course into a free, resume-worthy credential: pass the exam, run the course suite on TestingBot, and get a verifiable certificate for your LinkedIn profile.

[How it works](https://testingbot.com/resources/courses/cucumber-bdd/certification)
