PHPackages                             2bepublished/behat-config-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. 2bepublished/behat-config-generator

ActiveLibrary[Testing &amp; Quality](/categories/testing)

2bepublished/behat-config-generator
===================================

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

25.1kPHP

Since Oct 5Pushed 10y ago2 watchersCompare

[ Source](https://github.com/2bepublished/BehatConfigGenerator)[ Packagist](https://packagist.org/packages/2bepublished/behat-config-generator)[ RSS](/packages/2bepublished-behat-config-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

BehatConfigGenerator
====================

[](#behatconfiggenerator)

- Brought to you by \[2bePUBLISHED\]
- Developed by [Christoph Rosse](http://gries.tv)

[![Build Status](https://camo.githubusercontent.com/0c1cf6baa88bc9e129a5c7e15c72d89d5d617ad7538744cf36a513be8160f228/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f3262657075626c69736865642f4265686174436f6e66696747656e657261746f722e706e67)](http://travis-ci.org/2bepublished/BehatConfigGenerator)

About
-----

[](#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.

Installation
------------

[](#installation)

BehatConfigGenerator can be installed via composer

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

```

Examples
--------

[](#examples)

Please have a look at the [examples section.](examples/) to see a config + the output that is generated.

Usage
-----

[](#usage)

**Step 1: Create your devices list as `.csv`**

The csv uses the following fields:

- 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:

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

```

You have to create a: `order.features.csv` and a `cart.features.csv`

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/

```

Customize the templates
-----------------------

[](#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:

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

```

Features
--------

[](#features)

- Customize templates
- Generate a big number of Configurations

LICENSE
-------

[](#license)

See `LICENSE` file.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a80f9fc61cd3a7d7779e8f120b458ca4d18fdd885d719bb77d3379b96bf714d9?d=identicon)[florianeckerstorfer](/maintainers/florianeckerstorfer)

![](https://www.gravatar.com/avatar/db7c27a0fae43ee96bc83d30f0801bfcb2033cd403f013fa8a5795ba7c846672?d=identicon)[gries](/maintainers/gries)

---

Top Contributors

[![gries](https://avatars.githubusercontent.com/u/417823?v=4)](https://github.com/gries "gries (22 commits)")

### Embed Badge

![Health badge](/badges/2bepublished-behat-config-generator/health.svg)

```
[![Health](https://phpackages.com/badges/2bepublished-behat-config-generator/health.svg)](https://phpackages.com/packages/2bepublished-behat-config-generator)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
