IntelliJ IDEA 2020.1 Help

Run Cucumber tests

The Cucumber feature files are run same way as the other executables, with certain run/debug configuration settings.

Prior to running a test, you have to set up run/debug configuration for a particular feature file or scenario, or for the whole bunch of features within a directory. Creating a run/debug configuration is described in the section Create a run/debug configuration from a template .

However, there is always the possibility to run Cucumber tests with the default settings, which is described below.

Results of tests execution are displayed in the Test Runner tab of the Run tool window.

To run all feature files in a directory

  1. In the Project tool window, right-click the directory where the feature files are stored.

  2. On the context menu of the directory, choose Run all features in <directory name>.

To run a feature

  1. In the Project tool window, right-click the desired feature file, or open it in the editor.

  2. On the context menu of the feature file, choose Run Feature <name>.

To run a scenario

  1. In the Project tool window, right-click the desired feature file, or open it in the editor.

  2. On the context menu of the desired scenario, point to Run, and then choose Run Scenario <name>.

Last modified: 7 July 2020