2017 © Pedro Peláez
 

library behat-config-generator

A behat config generator driven to ease the use of browser-stack and multiple devices.

image

2bepublished/behat-config-generator

A behat config generator driven to ease the use of browser-stack and multiple devices.

  • Monday, October 5, 2015
  • by florianeckerstorfer
  • Repository
  • 2 Watchers
  • 2 Stars
  • 3,574 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 3 % Grown

The README.md

BehatConfigGenerator

Build Status, (*1)

About

A command-line tool that lets you generate behat.yml configs. 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., (*2)

Installation

BehatConfigGenerator can be installed via composer, (*3)

composer require "2bepublished/behat-config-generator"

Examples

Please have a look at the examples section. to see a config + the output that is generated., (*4)

Usage

Step 1: Create your devices list as .csv, (*5)

The csv uses the following fields:, (*6)

  • device_name
  • mink_session_name
  • browserstack_device
  • browserstack_user
  • browserstack_password
  • browserstack_os
  • browserstack_browser
  • browserstack_version
  • browserstack_os_version
"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:, (*7)

features/
    order/*.features
    cart/*.features

You have to create a: order.features.csv and a cart.features.csv, (*8)

The csv uses the following fields: feature,device1,device2,device3, (*9)

feature,firefox,iphone
search,true,true
show,true,false

Step 3: Generate the behat.yml by using the following command:, (*10)

php vendor/bin/behat-config-generator pub:generate-behat-config ./data/devices.csv ./data/feature_list/ ./output-directory/

Customize the templates

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:, (*11)

php vendor/bin/behat-config-generator pub:generate-behat-config --template-path="/my/templates/" ...

Features

  • Customize templates
  • Generate a big number of Configurations

LICENSE

See LICENSE file., (*12)

The Versions

05/10 2015

dev-master

9999999-dev

A behat config generator driven to ease the use of browser-stack and multiple devices.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christoph Rosse
by 2bePUBLISHED