A behat config generator driven to ease the use of browser-stack and multiple devices.
This package is not auto-updated.
Last update: 2020-02-07 16:04:14 UTC
- Brought to you by [2bePUBLISHED]
- Developed by Christoph Rosse
A command-line tool that lets you generate
It's main purpose is to ease the use of browserstack in combination with multiple devices.
BehatConfigGenerator lets you define which features should be executed on which devices when running the tests.
BehatConfigGenerator can be installed via composer
composer require "2bepublished/behat-config-generator"
Please have a look at the examples section. to see a config + the output that is generated.
Step 1: Create your devices list as
The csv uses the following fields:
"iphone","iphone_5_ios7","iPhone 5S","my-username","my-password","ios","iPhone","","7" "firefox","firefox_35_win","ANY","my-username","my-password","WINDOWS","firefox","35",""
Step 2: Create your feature / device mappings per module. If you have a behat setup with feature-files like this:
features/ order/*.features cart/*.features
You have to create a:
order.features.csv and a
The csv uses the following fields: feature,device1,device2,device3
feature,firefox,iphone search,true,true show,true,false
Step 3: Generate the
behat.yml by using the following command:
php vendor/bin/behat-config-generator pub:generate-behat-config ./data/devices.csv ./data/feature_list/ ./output-directory/
To customize the generated behat.yml you can easily change the templates that are used.
Create a folder containing a
device.yml.twig and a
module.yml.twig and pass the folder via. a command option like so:
php vendor/bin/behat-config-generator pub:generate-behat-config --template-path="/my/templates/" ...
- Customize templates
- Generate a big number of Configurations