🔥 Live 2,847 QA engineers learning right now — Start Free Automation Roadmap →

Cucumber BDD Visualizer

This free Cucumber BDD visualizer shows how a Gherkin feature file connects to the Java step definitions that run it, how scenarios and scenario outlines execute, and where hooks and tags fit in. It is built for SDETs learning behaviour-driven development or preparing to explain it in an interview.

↓ Open the tool

Gherkin: Given, When, Then

Gherkin is the plain-language format Cucumber reads. A scenario is written as Given (context), When (action) and Then (outcome), with And/But for extra steps. The value is that a product owner can read the scenario without knowing any code, while it still drives real automation underneath.

Step definitions: gluing Gherkin to code

Each Gherkin step is matched to a step definition — a Java method annotated with @Given, @When or @Then and a regular expression or Cucumber expression. Parameters in the step text are captured and passed to the method, so When I search for "selenium" maps to a method that receives "selenium".

Scenario Outline and Examples

To run the same scenario with different data, use a Scenario Outline with an Examples table. Each row becomes a separate test run — this is data-driven testing in BDD form, and a very common interview talking point.

Hooks and tags

@Before and @After hooks run setup and teardown around each scenario (open/close the browser, reset data). Tags like @smoke or @regression let you select which scenarios to run, so one suite can serve many purposes from CI.

How to use this tool

  1. Read the sample Gherkin scenario in the tool.
  2. See each step highlight as it maps to its Java step definition.
  3. Switch to a Scenario Outline and watch each Examples row run as a separate test.
  4. Toggle a tag to see how Cucumber filters which scenarios run.

Worked example

A Gherkin scenario and the step definition it maps to:

# search.feature
Scenario: Search returns results
  Given I am on the home page
  When I search for "selenium"
  Then I should see results for "selenium"

// StepDefs.java
@When("I search for {string}")
public void iSearchFor(String term) {
    searchPage.search(term);
}
The {string} parameter in the step is captured and passed to the Java method.

Common mistakes to avoid

Frequently asked questions

What is Cucumber and BDD?

Cucumber is a tool that runs tests written in the plain-language Gherkin format, supporting behaviour-driven development where scenarios describe behaviour in business-readable terms.

What is a step definition?

A Java method annotated with @Given, @When or @Then that is matched to a Gherkin step and contains the automation code that step runs.

What is a Scenario Outline?

A scenario run multiple times with different data supplied by an Examples table — Cucumber's form of data-driven testing.

What are hooks and tags in Cucumber?

Hooks (@Before/@After) run setup and teardown around scenarios; tags (@smoke, @regression) let you select which scenarios to run.

Is this Cucumber tool free?

Yes, it runs in your browser with nothing to install and is free for learning and interview prep.

Related guides & tools