---
title: 'BDD with Cucumber: Gherkin to CI: Free Online Course'
description: 'A free Cucumber BDD course: three amigos and example mapping, declarative
  Gherkin, Cucumber-JVM with Selenium, expressions, hooks and DI, outlines and tags,
  Cucumber-JS with Playwright, Behave, Reqnroll and CI on TestingBot.'
source_url:
  html: https://testingbot.com/resources/courses/cucumber-bdd
  md: https://testingbot.com/resources/courses/cucumber-bdd.md
---

Course

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

Chapter 1 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 1 of 12 Intermediate 5 min read Updated Nov 2026 

# Cucumber BDD Tutorial: From Gherkin to CI

A free Cucumber BDD course: three amigos and example mapping, declarative Gherkin, Cucumber-JVM with Selenium, expressions, hooks and DI, outlines and tags, Cucumber-JS with Playwright, Behave, Reqnroll and CI on TestingBot.

## What you will learn

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

[Continue where you left off](https://testingbot.com#)

## 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)On this page
1. [BDD in one example](https://testingbot.com#bdd-in-one-example)
2. [What Cucumber is not](https://testingbot.com#what-cucumber-is-not)
3. [Is BDD worth it?](https://testingbot.com#is-bdd-worth-it)
4. [Which language?](https://testingbot.com#which-language)
5. [How the course is organised](https://testingbot.com#how-the-course-is-organised)
6. [Prerequisites](https://testingbot.com#prerequisites)

_Last reviewed November 2026 against Cucumber-JVM 8.0.4, Selenium Java 4.52.0, JUnit Platform 6.1.3, Cucumber-JS 13.3.0, Playwright 1.65.0, Behave 1.3.3 and Reqnroll 3.3.4._

Behaviour-Driven Development (BDD) is a way for a team to agree on what a feature should do, using concrete examples, before anyone writes the code. Cucumber is a tool that turns those examples into automated tests. The two are often treated as one thing, and that confusion is behind most BDD suites that end up slow, brittle and ignored. This course teaches both, in that order: the practice first, then the tool.

## BDD in one example[#](https://testingbot.com#bdd-in-one-example)

A product owner, a developer and a tester talk about signing in. Instead of writing "users must be able to sign in", they agree on examples:

```gherkin
Feature: Signing in to the secure area
  Members sign in with a username and password to reach the secure area.
  Wrong credentials are rejected with a message that says which part was wrong.

  Scenario: Tom signs in with his own password
    Given Tom has an account
    When Tom signs in with his password
    Then he is in the secure area
```

That text is **Gherkin** : a small, structured language with keywords such as `Feature`, `Scenario`, `Given`, `When` and `Then`. Everyone in the conversation can read it and say "yes, that is what we mean" or "no, what happens if...". The same file is then executed by **Cucumber** , which matches each step to a piece of code (a _step definition_) that drives the application, here through Selenium.

So a BDD suite has three layers:

| Layer | Written by | Answers |
| --- | --- | --- |
| Feature files (Gherkin) | The whole team, in business language | What should the system do? |
| Step definitions (Java, JavaScript, Python, C#...) | Developers and testers | How do we check it? |
| Automation library (Selenium, Playwright, an HTTP client...) | Developers and testers | How do we talk to the system? |

## What Cucumber is not[#](https://testingbot.com#what-cucumber-is-not)

- **Not a test framework you add to get "BDD".** Cucumber executes examples. If nobody outside the test team reads or writes the feature files, you have an extra layer of indirection on top of ordinary UI tests, and the cost without the benefit. Chapter 1 is about the conversations that make the feature files worth having.
- **Not a UI testing tool.** Cucumber does not know about browsers. Many of the best scenarios are checked through an API or directly against domain code, which is faster and less fragile. This course uses Selenium and Playwright because a browser is the most common target and the hardest one to get right.
- **Not a scripting language for testers.** Scenarios full of "click", "type" and CSS selectors are the most common BDD anti-pattern (chapter 10). Gherkin describes _behaviour_; the step definitions hide the _mechanics_.

## Is BDD worth it?[#](https://testingbot.com#is-bdd-worth-it)

BDD pays off when the hard part of a feature is understanding the rules: pricing, permissions, eligibility, workflows with many states. The examples flush out misunderstandings before they become bugs. It pays off less for purely technical work, or when the same person writes the requirement, the code and the test. Use it where the conversation is valuable, and plain unit or end-to-end tests elsewhere. Nothing stops one repository from having both.

## Which language?[#](https://testingbot.com#which-language)

Cucumber has official implementations for many languages. This course uses **Cucumber-JVM with Java** for the main project, because it is the most widely used combination, and repeats the essentials with **Cucumber-JS and Playwright** in chapter 7. Chapter 9 shows the same feature with **Behave** (Python) and **Reqnroll** (.NET, the successor to SpecFlow). The Gherkin is identical in all of them; only the step definitions change.

## How the course is organised[#](https://testingbot.com#how-the-course-is-organised)

1. BDD as a collaboration practice: three amigos and example mapping
2. Writing good Gherkin
3. Cucumber-JVM with Java and Selenium: your first scenario, locally and on TestingBot
4. Step definitions, Cucumber expressions and parameter types
5. Hooks and sharing state between steps with dependency injection
6. Scenario Outlines, tags and Background
7. Cucumber-JS with Playwright
8. Parallel runs, reports, CI and pass/fail status on TestingBot
9. Other flavours: Behave for Python and Reqnroll for .NET
10. BDD anti-patterns
11. A knowledge check

All examples run against public demo pages, so you can copy them and see them pass: the login form at `the-internet.herokuapp.com` and the Playwright team's TodoMVC demo. Every cloud example in the course was run on the TestingBot grid.

## Prerequisites[#](https://testingbot.com#prerequisites)

- Basic Java (classes, constructors, annotations). Chapter 7 needs basic JavaScript, chapter 9 reads Python and C#.
- JDK 17 or newer (Cucumber-JVM 8 requires 17; the project compiles with `release` 17 and was run on Java 23), Maven 3.9, and Chrome installed locally.
- Node.js 22 or newer for chapter 7.
- A TestingBot account for the cloud runs (the free trial is enough).

If you want to go deeper on the Selenium side, the [Selenium Java tutorial with TestNG](https://testingbot.com/resources/courses/selenium-testng) covers waits, parallel drivers and grids in detail, and [the Page Object Model course](https://testingbot.com/resources/courses/page-object-model) explains the page classes that step definitions should call.

A note on certification: the course and its knowledge check are free and need no account. If you want something to show an employer, the optional [TestingBot certification](https://testingbot.com/resources/courses/cucumber-bdd/certification) asks for a passed exam and your Cucumber suite running on TestingBot. It is issued by TestingBot, not by the Cucumber project.

[Next · Chapter 2 BDD Testing Starts Before the Code: Three Amigos](https://testingbot.com/resources/courses/cucumber-bdd/bdd-collaboration)

On this page

1. [BDD in one example](https://testingbot.com#bdd-in-one-example)
2. [What Cucumber is not](https://testingbot.com#what-cucumber-is-not)
3. [Is BDD worth it?](https://testingbot.com#is-bdd-worth-it)
4. [Which language?](https://testingbot.com#which-language)
5. [How the course is organised](https://testingbot.com#how-the-course-is-organised)
6. [Prerequisites](https://testingbot.com#prerequisites)

Certification

Earn the free, resume-worthy TestingBot Cucumber BDD Certification for this course.

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

## Other free courses

- [Selenium Locators and Locator Strategies A free course on Selenium locators and locator strategies: CSS selectors, XPath, role-based and test-id loc...](https://testingbot.com/resources/courses/locator-strategies)
- [Accessibility Testing Tutorial: WCAG 2.2 A free, hands-on accessibility testing course: WCAG 2.2 in practice, manual keyboard and screen reader chec...](https://testingbot.com/resources/courses/accessibility-testing)
- [Mobile App Testing: From First Test to CI A free, hands-on mobile app testing course: emulators vs real devices, Appium vs Espresso vs XCUITest vs Ma...](https://testingbot.com/resources/courses/mobile-app-testing)
- [Flaky Tests: Find, Fix and Prevent Fix flaky tests for good: measure them, then remove the four root causes (waits, shared data, test order, r...](https://testingbot.com/resources/courses/flaky-tests)

[Browse all courses](https://testingbot.com/resources/courses)
