Cucumber
Cucumber supports BDD, and enables using features and scenarios written in a human-readable language.
In this section:
- Cucumber
- Enabling Cucumber Support in Project
- Creating .feature Files
- Creating Examples Table in Scenario Outline
- Creating Step Definition
- Navigating from .feature File to Step Definition
- Supporting Regular Expressions in Step Definitions
- Running Cucumber Tests
Prerequisites
Cucumber becomes available in IntelliJ IDEA, provided that the following prerequisites are met:
- Cucumber for Java:
The following is only valid when Cucumber for Java Plugin is installed and enabled!
- Cucumber for Java bundled plugin is enabled.
cucumber-java
version 1.xx is specified as a dependency.
- Cucumber for Groovy:
The following is only valid when Cucumber for Groovy Plugin is installed and enabled!
- Cucumber for Groovy bundled plugin is enabled.
cucumber-groovy
version 1.xx is specified as a dependency.
This feature is supported in the Ultimate edition only.
The following is only valid when Ruby Plugin is installed and enabled!
-
cucumber
gem (for Ruby projects), orcucumber
andcucumber-rails
(for Rails applications) is installed and activated.
Cucumber support
IntelliJ IDEA supports:
- Cucumber for Java, Cucumber for Groovy
This feature is supported in the Ultimate edition only.
The following is only valid when Cucumber.js and Gherkin plugins are installed and enabled!
This feature is supported in the Ultimate edition only.
The following is only valid when Ruby Plugin is installed and enabled!
- Cucumber both in plain Ruby projects, and in Rails applications.
Cucumber feature files are marked with icon.
Cucumber support includes:
- Syntax and error highlighting.
- Quick fix to create step definitions.
- Navigation between step definitions and steps.
- Ability to describe steps in English or any other language specified in the
# language:
comment. - Run/debug configurations: Cucumber, Cucumber for Java, Cucumber.js.
- Ability to run all features in a directory, a feature, or a single step within a feature.