edmondscommerce / behat-framework
Initial behat framework
Installs: 363
Dependents: 0
Suggesters: 7
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 1
Language:Shell
Requires
- behat/behat: ~3.3
- behat/mink: ~1.6
- behat/mink-extension: ~2.0
- behat/mink-selenium2-driver: ~1.2
- edmondscommerce/selenium-server: ~1
Suggests
- edmondscommerce/behat-chrome-performance-context: Measure various performance settings from Chrome (i.e ttfb)
- edmondscommerce/behat-error-detection-context: Detect various types of errors, including PHP fatal errors and W3C validation issues
- edmondscommerce/behat-error-handling-context: Provides utilities to pause on error and to take screenshots at time of error
- edmondscommerce/behat-faker-context: Parent framework, allows easier behat setup
This package is auto-updated.
Last update: 2024-10-29 04:36:33 UTC
README
By Edmonds Commerce
An easy to get up and running Behat 3 testing framework that includes chrome based mobile and tablet testing
Step One - Create or Update your Composer Dependencies
Template composer.json (copy paste)
For a brand new testing project, simply create a composer.json file and paste in the following:
{
"require": {
"edmondscommerce/behat-framework": "dev-master",
"edmondscommerce/behat-faker-context": "dev-master",
"edmondscommerce/behat-chrome-performance-context": "dev-master",
"edmondscommerce/behat-error-detection-context": "dev-master",
"edmondscommerce/behat-screenshot-context": "dev-master",
"edmondscommerce/behat-error-handling-context": "dev-master",
"edmondscommerce/behat-html-context": "0.0.1",
"edmondscommerce/behat-javascript-context": "dev-master",
"edmondscommerce/behat-mouse-context": "dev-master"
},
"config": {
"bin-dir": "bin/"
}
}
Then install the dependencies.
composer install --prefer-source
Or to add to an existing Project
Set the bin dir in your composer.json
"config": {
"bin-dir": "bin/"
}
And then run this to add to your composer.json and install
composer require edmondscommerce/behat-framework dev-master --prefer-source
Step Two - Copy Behat Config Files
Features
cp -R vendor/edmondscommerce/behat-framework/features .
You can then add your features and custom contexts as needed.
Behat Config
cp vendor/edmondscommerce/behat-framework/behat.dist ./behat.yaml
You will want to edit this file according to your requirements, but this is a good staritng point.
Step Three - Add Other Contexts
There are a number of packages available that compliment the framework with more features.
We have created some to get you started:
Generic Contexts
[https://github.com/edmondscommerce/behat-chrome-performance-context]
[https://github.com/edmondscommerce/behat-error-handling-context]
[https://github.com/edmondscommerce/behat-error-detection-context]
[https://github.com/edmondscommerce/behat-faker-context]
[https://github.com/edmondscommerce/behat-html-context]
[https://github.com/edmondscommerce/behat-javascript-context]
[https://github.com/edmondscommerce/behat-mouse-context]
[https://github.com/edmondscommerce/behat-screenshot-context
Platform Contexts
[https://github.com/edmondscommerce/behat-magento-one-context]
[https://github.com/edmondscommerce/behat-magento-2-context]
[https://github.com/edmondscommerce/behat-prestashop-context]