Behatch contexts provide most common Behat tests.
This extension requires:
- Behat 3+
- Mink
- Mink extension
Download the .phar archives:
- behat.phar - Behat itself
- mink.phar - Mink framework
- mink_extension.phar - Mink integration extension
- behatch_contexts.phar - Behatch contexts
And activate it in your in your behat.yml
:
The easiest way to keep your suite updated is to use Composer.
You can add Behatch contexts as dependencies for your project or rapidly bootstrap a Behatch projects.
- Define dependencies in your
composer.json
:
- Install/update your vendors:
- Activate extension by specifying its class in your
behat.yml
:
- Download the Behatch skeleton with composer:
Note
Browser, json, table and rest step need a mink configuration, see Mink extension for more information.
In behat.yml
, enable desired contexts:
browser
- more browser related steps (like mink)timeout
- default timeout
debug
- helper steps for debuggingscreenshotDir
- the directory where store screenshots
system
- shell related stepsroot
- the root directory of the filesystem
json
- JSON related stepsevaluationMode
- javascript "foo.bar" or php "foo->bar"
table
- play with HTML the tablesrest
- send GET, POST, … requests and test the HTTP headersxml
- XML related steps