soyuka/contexts
Behatch contexts is a Behat extension providing ready-made contexts for browser, debug, system, JSON, table, REST, and XML testing. Configure the contexts you need in behat.yml to write common Behat tests quickly.
Behatch contexts provide most common Behat tests.
This extension requires:
$ composer require --dev soyuka/contexts
behat.yml:# behat.yml
default:
# ...
extensions:
Behatch\Extension: ~
$ php composer.phar create-project behatch/skeleton
Browser, json, table and rest step need a mink configuration, see Mink extension for more information.
In behat.yml, enable desired contexts:
default:
suites:
default:
contexts:
- behatch:context:browser
- behatch:context:debug
- behatch:context:system
- behatch:context:json
- behatch:context:table
- behatch:context:rest
- behatch:context:xml
This project is self-tested, you can explore the features directory to find some examples.
browser - more browser related steps (like mink)
timeout - default timeoutdebug - helper steps for debugging
screenshotDir - the directory where store screenshotssystem - shell related steps
root - the root directory of the filesystemjson - JSON related steps
evaluationMode - javascript "foo.bar" or php "foo->bar"table - play with HTML the tablesrest - send GET, POST, ... requests and test the HTTP headersxml - XML related stepsFor example, if you want to change default directory to screenshots - you can do it this way:
default:
suites:
default:
contexts:
- behatch:context:debug:
screenshotDir: "var"
How can I help you explore Laravel packages today?