PHPackages                             da-eto-ya/behat-spawner-extension - 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. da-eto-ya/behat-spawner-extension

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

da-eto-ya/behat-spawner-extension
=================================

Spawns processes when Behat starts

v1.0.1(12y ago)14501[3 issues](https://github.com/da-eto-ya/behat-spawner-extension/issues)MITPHPPHP &gt;=5.3.4

Since Apr 21Pushed 10y ago1 watchersCompare

[ Source](https://github.com/da-eto-ya/behat-spawner-extension)[ Packagist](https://packagist.org/packages/da-eto-ya/behat-spawner-extension)[ Docs](https://github.com/da-eto-ya/behat-spawner-extension)[ RSS](/packages/da-eto-ya-behat-spawner-extension/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (5)Used By (0)

Behat spawner extension
=======================

[](#behat-spawner-extension)

[![Latest Stable Version](https://camo.githubusercontent.com/f4404d316a9fa2a04cd0d201f5e22653bda6e1d41b8efcb68e6680d15e9edd74/68747470733a2f2f706f7365722e707567782e6f72672f64612d65746f2d79612f62656861742d737061776e65722d657874656e73696f6e2f762f737461626c652e706e67)](https://packagist.org/packages/da-eto-ya/behat-spawner-extension)[![License](https://camo.githubusercontent.com/684c0a0a01accadfa0801747d9e28e58313c25c566fb4c407c72bef6b83fd1d6/68747470733a2f2f706f7365722e707567782e6f72672f64612d65746f2d79612f62656861742d737061776e65722d657874656e73696f6e2f6c6963656e73652e706e67)](https://packagist.org/packages/da-eto-ya/behat-spawner-extension)[![Build Status](https://camo.githubusercontent.com/bff38b5a62c18efbdf6965ab0bbbaf6bff1988499b799f7d500e65c7c6670ed4/68747470733a2f2f7472617669732d63692e6f72672f64612d65746f2d79612f62656861742d737061776e65722d657874656e73696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/da-eto-ya/behat-spawner-extension)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/46921e398a6373666d72f99abf9d6ca8865223382f46f3c07b1f4a315795af38/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f64612d65746f2d79612f62656861742d737061776e65722d657874656e73696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f733d61613464336232333936396639653765383338666532393233376238633461633230633635336366)](https://scrutinizer-ci.com/g/da-eto-ya/behat-spawner-extension/)[![Total Downloads](https://camo.githubusercontent.com/ae0775bc357029a7c2d1cc1df1bf5fb48e4b823e80b156946b09ecc6fa985c8b/68747470733a2f2f706f7365722e707567782e6f72672f64612d65746f2d79612f62656861742d737061776e65722d657874656e73696f6e2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/da-eto-ya/behat-spawner-extension)

Overview
--------

[](#overview)

Simple extension for spawn processes before you run your Behat test suite.

For example, it is useful when you run testing server instance (local php server, Selenium, PhantomJS, etc) on multiple environments (developer's machine, CI-server, etc) without need for bash/cmd script to run testing suite.

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

[](#installation)

Define dependencies in your `composer.json`:

```
{
    "require": {
        ...
        "da-eto-ya/behat-spawner-extension": "1.1.*@dev"
    }
}
```

Install/update your vendors:

```
$ curl http://getcomposer.org/installer | php
$ php composer.phar install
```

Or if you have composer installed global-wise on machine, you can use it:

```
$ composer install
```

Configure
---------

[](#configure)

Activate and configure extension in your `behat.yml`:

```
# behat.yml
default:
    # ...
    extensions:
        Behat\SpawnerExtension\ServiceContainer\SpawnerExtension:
            commands:           # array-formatted command list
                - [php, -S, localhost:8880, -t, web, web/index.php]
                - ['./bin/phantomjs', '--webdriver=8643']
            work_dir: '.'       # by default, use current directory
            win_prefix: ''      # prefix commands on Windows (default: empty)
            nix_prefix: 'exec'  # prefix commands on *-nix (default: 'exec')
            sleep: 0            # sleep after spawn (in milliseconds, default 0)
```

All settings are optional. `commands` option if general for use this extension.

Current, commands should be declared as arrays of strings (program name and arguments) for proper escaping on different operating systems.

Also, for heterogeneous setups, you can specify `win_prefix` and `nix_prefix`, but do it with care. You can specify `work_dir` as working directory for all commands.

And you can specify `sleep` option in milliseconds for pause between spawn processes and start process features (for example, if you should wait for spawned server to start). Pause will be only if you declare some commands, obviously.

Changelog
---------

[](#changelog)

### v1.0.1

[](#v101)

- Fix bugs with configuration on Windows (default `work_dir` equals `'.'` now)

### v1.0.0

[](#v100)

- Initial version

TODO
----

[](#todo)

- Allow simple string command definition
- Add commands configuration validation
- Add checks for process pipeline (stop only after spawn)

Contribution
------------

[](#contribution)

It is more than welcome as always!

Feel free to contact me and post issues/bugs/enhancements through [the issue system](https://github.com/da-eto-ya/behat-spawner-extension/issues/new).

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~24 days

Total

4

Last Release

4329d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/49565499?v=4)[da-eto-ya](/maintainers/da-eto-ya)[@Da-eto-Ya](https://github.com/Da-eto-Ya)

---

Top Contributors

[![da-eto](https://avatars.githubusercontent.com/u/145482?v=4)](https://github.com/da-eto "da-eto (49 commits)")

---

Tags

processBehatextensionspawner

### Embed Badge

![Health badge](/badges/da-eto-ya-behat-spawner-extension/health.svg)

```
[![Health](https://phpackages.com/badges/da-eto-ya-behat-spawner-extension/health.svg)](https://phpackages.com/packages/da-eto-ya-behat-spawner-extension)
```

###  Alternatives

[laracasts/behat-laravel-extension

Laravel extension for Behat

2611.3M12](/packages/laracasts-behat-laravel-extension)[dmarynicz/behat-parallel-extension

Parallel extension for Behat

27544.3k](/packages/dmarynicz-behat-parallel-extension)[tonicforhealth/behat-parallel-scenario

Behat parallel scenario

24354.7k](/packages/tonicforhealth-behat-parallel-scenario)[zalas/behat-no-extension

The ultimate Behat extension

31137.9k1](/packages/zalas-behat-no-extension)[soulcodex/laravel-behat

Laravel Extension for easy integration with Behat

1760.8k](/packages/soulcodex-laravel-behat)

PHPackages © 2026

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