integratedexperts / behat-steps
Collection of steps for Behat
Requires
- php: >=8.3
- behat/behat: ^3.33.0 || ^4.0
- behat/mink: >=1.13.0
- behat/mink-browserkit-driver: ^2.3.0
- friends-of-behat/mink-extension: ^2.7.5 || ^3.0@alpha
- symfony/browser-kit: ^6.4 || ^7 || ^8
- symfony/config: ^6.4.3 || ^7 || ^8
- symfony/dependency-injection: ^6.4 || ^7 || ^8
- symfony/event-dispatcher: ^6.4 || ^7 || ^8
- symfony/filesystem: ^6.4 || ^7 || ^8
- symfony/http-client: ^6.4 || ^7 || ^8
- symfony/mime: ^6.4 || ^7 || ^8
- symfony/process: ^6.4 || ^7 || ^8
- symfony/var-exporter: ^6.4 || ^7 || ^8
- symfony/yaml: ^6.4 || ^7 || ^8
Requires (Dev)
- alexskrypnyk/phpunit-helpers: ^1.2.0
- cweagans/composer-patches: ^2.0
- dantleech/gherkin-lint: ^0.2.4
- dealerdirect/phpcodesniffer-composer-installer: ^1.2.1
- dmore/behat-chrome-extension: ^1.5.0
- drevops/behat-phpserver: ^3.0.0
- drevops/behat-screenshot: ^3.1.0
- drevops/phpcs-standard: ^1.1.0
- drupal/coder: ^9.0.1
- dvdoug/behat-code-coverage: ^5.3.7
- ergebnis/composer-normalize: ^2.56.0
- justinrainbow/json-schema: ^6.6.1
- lullabot/mink-selenium2-driver: ^1.7.4
- mglaman/phpstan-drupal: ^2.3.0
- nikic/php-parser: ^5.9.0
- php-parallel-lint/php-parallel-lint: ^1.4
- phpcompatibility/php-compatibility: ^10.0.0-alpha2@alpha
- phpspec/prophecy-phpunit: ^2.5.0
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan: ^2.3.5
- phpunit/phpunit: ^12.5.43
- rector/rector: ^2.8.4
- softcreatr/jsonpath: ^0.10 || ^1.0
Suggests
- dmore/behat-chrome-extension: JavaScript driver for @javascript scenarios: drives headless Chrome directly over the Chrome DevTools Protocol (selenium-less). Interchangeable with lullabot/mink-selenium2-driver - install one.
- justinrainbow/json-schema: Required by JsonTrait for JSON Schema validation steps ('the response should match the JSON schema ...').
- lullabot/mink-selenium2-driver: JavaScript driver for @javascript scenarios: drives a Selenium/WebDriver server. Interchangeable with dmore/behat-chrome-extension - install one.
- softcreatr/jsonpath: Required by JsonTrait for JSON path assertion steps ('the JSON path ... should ...') and by RestTrait for the steps that set a request header from a JSON path.
Provides
None
Conflicts
Replaces
None
- dev-main
- 4.1.0
- 4.0.0
- 4.0.0-rc4
- 4.0.0-rc3
- 4.0.0-rc2
- 4.0.0-rc1
- 3.x-dev
- 3.14.4
- 3.14.3
- 3.14.2
- 3.14.1
- 3.14.0
- 3.13.0
- 3.12.0
- 3.11.1
- 3.11.0
- 3.10.0
- 3.9.0
- 3.8.2
- 3.8.1
- 3.8.0
- 3.7.0
- 3.6.0
- 3.5.2
- 3.5.1
- 3.5.0
- 3.4.0
- 3.3.1
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.2
- 3.0.1
- 3.0.0
- 2.x-dev
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.1
- 2.0.0
- 1.x-dev
- 1.6.0
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.0
- 0.3.1
- 0.3.0
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.10
- 0.1.9
- 0.1.8
- 0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-feature/1139-browser-time
This package is auto-updated.
Last update: 2026-11-09 21:32:58 UTC
README
Behat Steps
A collection of Behat steps for PHP and Drupal projects
Read the documentation for the latest release, or the development documentation built from main.
Behat lets you write tests as plain-English scenarios, then runs them against your site:
Feature: Contact page Scenario: Visitor finds the contact page When I visit "/contact" Then the response status code should be 200 And I should see the heading "Contact"
Behat runs a step only when PHP code stands behind it. Behat Steps is that code, already written and tested. It ships steps that work on any website and steps that only mean something on a Drupal site. Every step is a thin wrapper over named helpers, which your own steps can call too.
Features
- Web and Drupal steps for pages, forms, APIs, email, caches, content and more, with an example for each.
- Helpers behind every step, for the steps you write in your project's own words.
- Backends picked by capability, so a step runs in-process or through Drush.
- Support for Behat 3.33+ and Behat 4, Drupal 11 and 12, and PHP 8.3 to 8.5.
- BrowserKit, Selenium and Chrome DevTools browser drivers.
- Cleanup of the entities a scenario creates.
- Step and helper references in the package for AI coding agents, and a skill the agent follows to write your own steps on the helpers.
Installation
In your project's root, run the following command:
composer require --dev drevops/behat-steps:^4
The command also installs Behat, Mink and the rest of what the steps run on. A few steps need a package of their own, which Behat Steps lists under suggest in its composer.json:
softcreatr/jsonpathandjustinrainbow/json-schemafor the JSON path and JSON schema steps.lullabot/mink-selenium2-driverordmore/behat-chrome-extensionfor@javascriptscenarios, which drive a real browser.
Follow the Quick start from here to a passing scenario. Installation covers the optional dependencies and the JavaScript browser drivers. New to Behat? Key concepts explains its moving parts in plain words.
Migrating from 3.x
MIGRATION.md lists the changes from 3.14 to 4.0, and an AI coding agent can apply them for you. Migrating from 3.x shows how.
Writing tests with AI assistants
The step and helper references ship with the package as STEPS.md and HELPERS.md, so a coding agent in your project reads them from vendor/drevops/behat-steps/. The create-behat-step skill ships beside them. Describe a step, and your agent writes it on the helpers, in a trait your own context uses. Writing tests with AI assistants has a snippet for your CLAUDE.md or AGENTS.md, and shows how to install the skill.
Contributing
Contributions are welcome. CONTRIBUTING.md holds the rules for code in this repository and the local development setup. The documentation site's Contributing section walks through a code change and writing the docs.
This repository was created using the Scaffold project template
