PhpStorm 2021.2 Help

Code Inspections in Cucumber

This topic lists all PhpStorm code inspections available in Cucumber.

You can toggle specific inspections or change their severity level on the Editor | Inspections page of the IDE settings Ctrl+Alt+S.

Inspection

Description

Default Severity

Gherkin table is broken

Reports a table if there is at least one row with the number of cells different from the number of cells in the table header.

Error Error

Misplaced background section

Reports Background sections that are located incorrectly. The Background section must be located before the Scenario section.

Error Error

Missing ':' after examples keyword

Reports Examples sections in Cucumber .feature files if they do not have ':' after the Examples keyword.

Error Error

Missing examples section

Reports scenario outlines in Cucumber .feature files that do not have the Examples section.

Use the quick-fix to automatically create the Examples section with a pre-filled table header.

Error Error

Scenario with Examples section

Reports Gherkin scenarios that contain an Examples section.

Use the quick-fix to convert Scenario to Scenario Outline.

Error Error

Undefined step

Reports steps in Cucumber (or some other Gherkin) .feature files that do not have matching step definitions.

Use the quick-fix to automatically create a new step definition.

Warning Warning

Unused or missing columns in Cucumber tables

Reports tables in Examples sections in Cucumber .feature files with unused or missing columns.

Warning Warning

Last modified: 16 July 2021