Cucumber UI is a Drupal module that lets you create, edit and run Cucumber (Gherkin) feature tests of your site from the administration interface, with webship-js as the runner.
What it does
- A Run tests page at
/admin/config/development/cucumber-uiruns the site's Cucumber tests and shows the process status, with a kill link while a run is in progress. - A Create test page writes a
.featurefile in an Ace-powered editor with step autocomplete, and Run, Save and Download buttons. - A Settings page for the Cucumber configuration path and file, the features directory, and the HTML, JSON and console log report directories.
- The test output is rendered from the generated HTML report, or from the console log.
- Three permissions: create tests, run all tests, and administer the settings. Claro and Gin stylesheets, attached per active administration theme.
Requirements and installation
Drupal core 11.4 or later; no contributed module is required. Running the tests needs a Cucumber runner on the server, such as webship-js (Playwright and Cucumber-js), configured through the module settings.
composer require drupal/cucumber_ui
drush en cucumber_ui
Usage
Go to admin/config/development/cucumber-ui/settings, set the Cucumber configuration directory and file name, the features directory and the report directories, and grant the three permissions to the right roles. Then open admin/config/development/cucumber-ui, press Run cucumber tests and watch the report in the output pane. The Create test tab writes a new scenario, runs it on its own, and saves or downloads the .feature file.
Project page: drupal.org/project/cucumber_ui.