PHPackages                             nicofuma/behatch-contexts - 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. nicofuma/behatch-contexts

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

nicofuma/behatch-contexts
=========================

Behatch contexts fork (jsonschema 2 and 3)

2.5.0.3(6y ago)125.8kbeerwarePHPPHP &gt;=5.6

Since Aug 24Pushed 6y ago2 watchersCompare

[ Source](https://github.com/Nicofuma/behatch-contexts)[ Packagist](https://packagist.org/packages/nicofuma/behatch-contexts)[ RSS](/packages/nicofuma-behatch-contexts/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (4)Dependencies (7)Versions (5)Used By (0)

Behatch contexts
================

[](#behatch-contexts)

[![Build status](https://camo.githubusercontent.com/6761659ac49f1a75a50f3c763e12343cfe351a90358b686e856731b9864ab911/68747470733a2f2f7472617669732d63692e6f72672f426568617463682f636f6e74657874732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Behatch/contexts)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/1fd7cd4c681b72d7088a22e21a1251dacebe0fb0b4a77cc7b8a9a6ab5fd784ed/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f426568617463682f636f6e74657874732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Behatch/contexts/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/277bdaa9b10630494c5d1571b5420a53ac073ad5301c7069fb1ef49873786b21/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f426568617463682f636f6e74657874732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Behatch/contexts/?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/c3779c6e7dd07fa838173d5ca53a64fbc04b16b626552e68344c0f792b5fbf6e/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f65643038656130362d393363322d346239302d623635622d3433363433303262353130382f6d696e692e706e67)](https://insight.sensiolabs.com/projects/ed08ea06-93c2-4b90-b65b-4364302b5108)Behatch contexts provide most common Behat tests.

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

[](#installation)

This extension requires:

- Behat 3+
- Mink
- Mink extension

### Through PHAR

[](#through-phar)

Download the .phar archives:

- [behat.phar](http://behat.org/downloads/behat.phar) - Behat itself
- [mink.phar](http://behat.org/downloads/mink.phar) - Mink framework
- [mink\_extension.phar](http://behat.org/downloads/mink_extension.phar) - Mink integration extension
- [behatch\_contexts.phar](http://behat.org/downloads/behatch_contexts.phar) - Behatch contexts

And activate it in your in your `behat.yml`:

```
# behat.yml
default:
    # ...
    extensions:
        behatch_contexts.phar: ~
```

### Through Composer

[](#through-composer)

The easiest way to keep your suite updated is to use [Composer](http://getcomposer.org).

You can add Behatch contexts as dependencies for your project or rapidly bootstrap a Behatch projects.

#### Project dependency

[](#project-dependency)

1. Define dependencies in your `composer.json`:

```
{
    "require-dev": {
        ...

        "behatch/contexts": "*"
    }
}
```

2. Install/update your vendors:

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

3. Activate extension by specifying its class in your `behat.yml`:

```
# behat.yml
default:
    # ...
    extensions:
        Sanpi\Behatch\Extension: ~
```

#### Project boostraping

[](#project-boostraping)

1. Download the Behatch skeleton with composer:

```
$ curl http://getcomposer.org/installer | php
$ php composer.phar create-project behatch/skeleton
```

Note

Browser, json, table and rest step need a mink configuration, see [Mink extension](http://extensions.behat.org/mink/) for more information.

Usage
-----

[](#usage)

In `behat.yml`, enable desired contexts:

```
default:
    suites:
        default:
            contexts:
                - behatch:browser
                - behatch:debug
                - behatch:system
                - behatch:json
                - behatch:table
                - behatch:rest
                - behatch:xml
```

Configuration
-------------

[](#configuration)

- `browser` - more browser related steps (like mink)
    - `timeout` - default timeout
- `debug` - helper steps for debugging
    - `screenshotDir` - the directory where store screenshots
- `system` - shell related steps
    - `root` - the root directory of the filesystem
- `json` - JSON related steps
    - `evaluationMode` - javascript "foo.bar" or php "foo-&gt;bar"
- `table` - play with HTML the tables
- `rest` - send GET, POST, … requests and test the HTTP headers
- `xml` - XML related steps

Translation
-----------

[](#translation)

[![See more information on Transifex.com](https://camo.githubusercontent.com/26cc720af99f6e76a5fca51d9a14d9843efe813fd5d0c565cb4c949094c7bf6c/68747470733a2f2f7777772e7472616e73696665782e636f6d2f70726f6a656374732f702f626568617463682d636f6e74657874732f7265736f757263652f656e786c6966662f63686172742f696d6167655f706e67)](https://www.transifex.com/projects/p/behatch-contexts/)

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 81.7% 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 ~352 days

Total

4

Last Release

2533d ago

PHP version history (2 changes)2.5PHP &gt;=5.4

2.5.0.3PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/10359f9e7830aeb3ded33b2c96e22b36728e7c5d2a052b08a91d00bd7ca15740?d=identicon)[Nicofuma](/maintainers/Nicofuma)

---

Top Contributors

[![sanpii](https://avatars.githubusercontent.com/u/113045?v=4)](https://github.com/sanpii "sanpii (340 commits)")[![chorry](https://avatars.githubusercontent.com/u/699112?v=4)](https://github.com/chorry "chorry (7 commits)")[![tophsic](https://avatars.githubusercontent.com/u/930980?v=4)](https://github.com/tophsic "tophsic (7 commits)")[![tyx](https://avatars.githubusercontent.com/u/245494?v=4)](https://github.com/tyx "tyx (6 commits)")[![davialexandre](https://avatars.githubusercontent.com/u/388373?v=4)](https://github.com/davialexandre "davialexandre (5 commits)")[![Nicofuma](https://avatars.githubusercontent.com/u/591456?v=4)](https://github.com/Nicofuma "Nicofuma (5 commits)")[![EmmanuelVella](https://avatars.githubusercontent.com/u/663607?v=4)](https://github.com/EmmanuelVella "EmmanuelVella (5 commits)")[![pborreli](https://avatars.githubusercontent.com/u/77759?v=4)](https://github.com/pborreli "pborreli (4 commits)")[![areyt](https://avatars.githubusercontent.com/u/1827073?v=4)](https://github.com/areyt "areyt (3 commits)")[![GabrielCW](https://avatars.githubusercontent.com/u/15729946?v=4)](https://github.com/GabrielCW "GabrielCW (3 commits)")[![gimler](https://avatars.githubusercontent.com/u/200904?v=4)](https://github.com/gimler "gimler (3 commits)")[![jdecool](https://avatars.githubusercontent.com/u/433926?v=4)](https://github.com/jdecool "jdecool (3 commits)")[![matts2cant](https://avatars.githubusercontent.com/u/1333408?v=4)](https://github.com/matts2cant "matts2cant (3 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (2 commits)")[![dunglas](https://avatars.githubusercontent.com/u/57224?v=4)](https://github.com/dunglas "dunglas (2 commits)")[![nicoosh](https://avatars.githubusercontent.com/u/3594774?v=4)](https://github.com/nicoosh "nicoosh (2 commits)")[![bendavies](https://avatars.githubusercontent.com/u/625392?v=4)](https://github.com/bendavies "bendavies (2 commits)")[![iamluc](https://avatars.githubusercontent.com/u/1539731?v=4)](https://github.com/iamluc "iamluc (2 commits)")[![bocharsky-bw](https://avatars.githubusercontent.com/u/3317635?v=4)](https://github.com/bocharsky-bw "bocharsky-bw (1 commits)")[![blazarecki](https://avatars.githubusercontent.com/u/1443312?v=4)](https://github.com/blazarecki "blazarecki (1 commits)")

---

Tags

BDDSymfony2ContextBehat

### Embed Badge

![Health badge](/badges/nicofuma-behatch-contexts/health.svg)

```
[![Health](https://phpackages.com/badges/nicofuma-behatch-contexts/health.svg)](https://phpackages.com/packages/nicofuma-behatch-contexts)
```

###  Alternatives

[soyuka/contexts

Behatch contexts

282.2M21](/packages/soyuka-contexts)[dmarynicz/behat-parallel-extension

Parallel extension for Behat

28605.7k3](/packages/dmarynicz-behat-parallel-extension)[novaway/common-contexts

Novaway Behat common contexts

18190.4k3](/packages/novaway-common-contexts)[marcortola/behat-seo-contexts

Behat extension for testing some On-Page SEO factors: meta title/description, canonical, hreflang, meta robots, robots.txt, redirects, sitemap validation, HTML validation, performance...

13160.4k](/packages/marcortola-behat-seo-contexts)[macpaw/behat-messenger-context

Behat Context for testing Symfony Messenger component

17239.1k](/packages/macpaw-behat-messenger-context)

PHPackages © 2026

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