nicofuma / behatch-contexts
Behatch contexts fork (jsonschema 2 and 3)
Installs: 25 742
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: >=5.6
- behat/behat: ~3.0
- behat/mink-extension: ~2.0
- justinrainbow/json-schema: ~2.0
- symfony/property-access: ~2.3|~3.0|~4.0
Requires (Dev)
- atoum/atoum: ~3.0
- behat/mink-goutte-driver: ~1.1
- behat/mink-selenium2-driver: ~1.2
Replaces
- behatch/contexts: 2.5.0.3
- sanpi/behatch-contexts: 2.5.0.3
This package is auto-updated.
Last update: 2024-12-18 01:21:33 UTC
README
Behatch contexts provide most common Behat tests.
Installation
This extension requires:
- Behat 3+
- Mink
- Mink extension
Through PHAR
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
:
# behat.yml default: # ... extensions: behatch_contexts.phar: ~
Through Composer
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.
Project dependency
- Define dependencies in your
composer.json
:
{ "require-dev": { ... "behatch/contexts": "*" } }
- Install/update your vendors:
$ curl http://getcomposer.org/installer | php
$ php composer.phar install
- Activate extension by specifying its class in your
behat.yml
:
# behat.yml default: # ... extensions: Sanpi\Behatch\Extension: ~
Project boostraping
- Download the Behatch skeleton with composer:
$ curl http://getcomposer.org/installer | php
$ php composer.phar create-project behatch/skeleton
Note
Browser, json, table and rest step need a mink configuration, see Mink extension for more information.
Usage
In behat.yml
, enable desired contexts:
default: suites: default: contexts: - behatch:browser - behatch:debug - behatch:system - behatch:json - behatch:table - behatch:rest - behatch:xml
Configuration
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