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

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

svetel/behatch-contexts
=======================

Revived abandoned "Behatch contexts".

4.0.2(3y ago)16.8k↓100%beerwareGherkinPHP &gt;=8.1

Since Jun 29Pushed 3y agoCompare

[ Source](https://github.com/svetel/behatch-contexts)[ Packagist](https://packagist.org/packages/svetel/behatch-contexts)[ RSS](/packages/svetel-behatch-contexts/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (10)Versions (34)Used By (0)

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

[](#behatch-contexts)

[![Build status](https://github.com/svetel/behatch-contexts/actions/workflows/php.yml/badge.svg?branch=master)](https://github.com/svetel/behatch-contexts/actions/workflows/php.yml)[![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine/)Behatch contexts provide most common Behat tests.

This project forked from [Behatch/contexts](https://github.com/Behatch/contexts)

- Added support php 8.1
- Fixed deprecations
- Fixed tests for all tags, except:
    - @user
    - @skip
    - @javascript

Welcome to contribute

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

[](#installation)

This extension requires:

- Behat 3+
- Mink
- Mink extension

### Project dependency

[](#project-dependency)

1. [Install Composer](https://getcomposer.org/download/)
2. Require the package with Composer:

```
$ composer require --dev svetel/behatch-contexts

```

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

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

### Project bootstrapping

[](#project-bootstrapping)

1. Download the Behatch skeleton with composer:

```
$ php composer.phar create-project behatch/skeleton

```

Browser, json, table and rest step need a mink configuration, see [Mink extension](https://github.com/Behat/MinkExtension) for more information.

Usage
-----

[](#usage)

In `behat.yml`, enable desired contexts:

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

### Examples

[](#examples)

This project is self-tested, you can explore the [features directory](./tests/features) to find some examples.

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

### Configuration Example

[](#configuration-example)

For example, if you want to change default directory to screenshots - you can do it this way:

```
default:
    suites:
        default:
            contexts:
                - behatch:context:debug:
                    screenshotDir: "var"
```

###  Health Score

40

—

FairBetter than 87% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 82.5% 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 ~150 days

Recently: every ~418 days

Total

27

Last Release

1151d ago

Major Versions

1.4 → 2.02014-04-21

1.5 → 2.22015-06-03

2.8.0 → 3.0.02017-11-23

2.8.1 → 3.1.02018-03-11

3.3.0 → 4.0.02023-02-28

PHP version history (4 changes)2.2PHP ~5.4

2.3PHP &gt;=5.4

2.8.0PHP &gt;=5.5

4.0.0PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

[![sanpii](https://avatars.githubusercontent.com/u/113045?v=4)](https://github.com/sanpii "sanpii (461 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)")[![gpenverne](https://avatars.githubusercontent.com/u/401993?v=4)](https://github.com/gpenverne "gpenverne (6 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)")[![dunglas](https://avatars.githubusercontent.com/u/57224?v=4)](https://github.com/dunglas "dunglas (5 commits)")[![EmmanuelVella](https://avatars.githubusercontent.com/u/663607?v=4)](https://github.com/EmmanuelVella "EmmanuelVella (5 commits)")[![razbakov](https://avatars.githubusercontent.com/u/298778?v=4)](https://github.com/razbakov "razbakov (4 commits)")[![gimler](https://avatars.githubusercontent.com/u/200904?v=4)](https://github.com/gimler "gimler (4 commits)")[![ilovemistakes](https://avatars.githubusercontent.com/u/1580540?v=4)](https://github.com/ilovemistakes "ilovemistakes (4 commits)")[![pborreli](https://avatars.githubusercontent.com/u/77759?v=4)](https://github.com/pborreli "pborreli (4 commits)")[![tekante](https://avatars.githubusercontent.com/u/223075?v=4)](https://github.com/tekante "tekante (3 commits)")[![badaz](https://avatars.githubusercontent.com/u/5735255?v=4)](https://github.com/badaz "badaz (3 commits)")[![areyt](https://avatars.githubusercontent.com/u/1827073?v=4)](https://github.com/areyt "areyt (3 commits)")[![matts2cant](https://avatars.githubusercontent.com/u/1333408?v=4)](https://github.com/matts2cant "matts2cant (3 commits)")[![GabrielCW](https://avatars.githubusercontent.com/u/15729946?v=4)](https://github.com/GabrielCW "GabrielCW (3 commits)")[![jdecool](https://avatars.githubusercontent.com/u/433926?v=4)](https://github.com/jdecool "jdecool (3 commits)")[![wadjei](https://avatars.githubusercontent.com/u/344321?v=4)](https://github.com/wadjei "wadjei (2 commits)")[![bendavies](https://avatars.githubusercontent.com/u/625392?v=4)](https://github.com/bendavies "bendavies (2 commits)")

---

Tags

bddbdd-testsbehat-contextbehat-extensionphp8symfonyBDDContextBehat

### Embed Badge

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

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

###  Alternatives

[soyuka/contexts

Behatch contexts

282.1M11](/packages/soyuka-contexts)[novaway/common-contexts

Novaway Behat common contexts

18187.8k3](/packages/novaway-common-contexts)[macpaw/behat-messenger-context

Behat Context for testing Symfony Messenger component

16232.9k](/packages/macpaw-behat-messenger-context)[dmarynicz/behat-parallel-extension

Parallel extension for Behat

27544.3k](/packages/dmarynicz-behat-parallel-extension)[leanphp/behat-code-coverage

Generate Code Coverage reports for Behat tests

50359.8k2](/packages/leanphp-behat-code-coverage)[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...

13153.8k](/packages/marcortola-behat-seo-contexts)

PHPackages © 2026

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