PHPackages                             drupol/phingbehattask - 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. drupol/phingbehattask

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

drupol/phingbehattask
=====================

Behat task for Phing.

1.2.1(3y ago)097.9kGPL-2.0+PHP

Since Feb 16Pushed 3y ago1 watchersCompare

[ Source](https://github.com/drupol/phingbehattask)[ Packagist](https://packagist.org/packages/drupol/phingbehattask)[ Docs](https://github.com/drupol/phingbehattask)[ RSS](/packages/drupol-phingbehattask/feed)WikiDiscussions main Synced today

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

Phing Behat Task
----------------

[](#phing-behat-task)

[![Build Status](https://camo.githubusercontent.com/4bde6700d3d35563c1a2e3f6997455f81cc6183d364f482967cd067914def553/68747470733a2f2f7472617669732d63692e6f72672f647275706f6c2f7068696e6762656861747461736b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/drupol/phingbehattask)

A Behat task for [Phing](http://www.phing.info/). This task enable usage of Behat commands in Phing build scripts.

Phing provides tools for usual tasks for PHP projects (phplint, jslint, VCS checkouts, files copy or merge, packaging, upload, etc.). Integration of Behat in Phing is particularly useful when building and testing Drupal projects in a continuous integration server such as [Jenkins](http://jenkins-ci.org/), [Travis](https://travis-ci.org/)or [Continuous PHP](https://continuousphp.com/).

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

[](#installation)

Installation must be done through [Composer](https://getcomposer.org/):

```
  composer require drupol/phingbehattask

```

or by editing your composer.json file and add in the right section:

```
{
  "require": {
    "drupol/phingbehattask": "dev-master"
  }
}
```

Usage
-----

[](#usage)

### Behat task

[](#behat-task)

To use the Behat task in your build file, it must be made available to Phing so that the buildfile parser is aware a correlating XML element and it's parameters.

This is done by adding a `` task to your build file:

```

```

or by importing the `import.xml` file:

```

```

Once imported, you are able to use it:

```

    ${project.basedir}/tests/behat.yml

```

See the [Phing documentation](http://www.phing.info/docs/guide/stable/chapters/appendixes/AppendixB-CoreTasks.html#TaskdefTask) for more information on the `` task.

As the Phing Behat Task extends the Phing ExecTask, you are able to use all the options of that command.

Have a look at [the ExecTask documentation](https://www.phing.info/docs/guide/trunk/ExecTask.html) for the complete list of options.

### Behat load balancer task

[](#behat-load-balancer-task)

The Behat load balancer task splits your feature files into an arbitrary number of Behat configuration files.

To use the Behat load balancer task in your build file, it must be made available to Phing so that the buildfile parser is aware a correlating XML element and it's parameters.

This is done by adding a `` task to your build file:

```

```

or by importing the `import.xml` file:

```

```

Once imported, you are able to use it as follow:

```

```

The attributes have the following meaning:

- `containers`: Number of Behat configuration files the feature files will be split into.
- `root`: Path to your Behat `/features` directory.
- `destination`: Destination directory in which the new behat files will be generated.
- `import`: Main Behat configuration file to be imported in each of the generated file.

You can then configure your continuous integration to run one behat file per environment.

Filtering
---------

[](#filtering)

The behat balancer also allows for filtering on tags when using multiple profiles.

Filtering matches behat filtering \[[http://behat.org/en/latest/user\_guide/configuration/suites.html#suite-filters](http://behat.org/en/latest/user_guide/configuration/suites.html#suite-filters)\]

The following example will first filter the features into profile specific features, by using the tags as a filter:

- default: NOT @wip AND NOT @profile AND NOT @login AND must contain @theme will only be included and then balanced.
- secondary\_profile: NOT @secondary\_profile AND NOT @api AND must contain @secondary\_theme or the the text 'As a(n) administrator' will only be included and then balanced. The filters are based on behat's filters and as such will also match any features that contain scenarios that are tagged.

```

         ~@wip&&~@profile&&~@login&&@theme ]]>

         ~@secondary_profile&&~@api&&@secondary_theme ]]>
        administrator

```

The balanced files will generate files in the following format `behat.{profile}.{part}.yml` and will produce the output:

```
imports:
  - {behat_configuration_file}
{profile}:
  suites:
    default:
      paths:
        - {feature}
        - {feature}
```

If there are no filters, for backward compatibility the file name is `behat.{part}.yml`.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1229d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/252042?v=4)[Pol Dellaiera](/maintainers/drupol)[@drupol](https://github.com/drupol)

---

Top Contributors

[![drupol](https://avatars.githubusercontent.com/u/252042?v=4)](https://github.com/drupol "drupol (2 commits)")

---

Tags

testcontinuous integrationBehatciphing

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/drupol-phingbehattask/health.svg)

```
[![Health](https://phpackages.com/badges/drupol-phingbehattask/health.svg)](https://phpackages.com/packages/drupol-phingbehattask)
```

###  Alternatives

[php-coveralls/php-coveralls

PHP client library for Coveralls API

51514.1M3.6k](/packages/php-coveralls-php-coveralls)[polishsymfonycommunity/symfony-mocker-container

Provides base Symfony dependency injection container enabling service mocking.

1448.1M254](/packages/polishsymfonycommunity-symfony-mocker-container)[dvdoug/behat-code-coverage

Generate Code Coverage reports for Behat tests

623.8M47](/packages/dvdoug-behat-code-coverage)[robertfausk/behat-panther-extension

Symfony Panther extension for Behat

341.9M104](/packages/robertfausk-behat-panther-extension)[nuvoleweb/drupal-behat

Drupal Behat extension.

33823.5k4](/packages/nuvoleweb-drupal-behat)[leanphp/behat-code-coverage

Generate Code Coverage reports for Behat tests

50360.7k2](/packages/leanphp-behat-code-coverage)

PHPackages © 2026

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