PHPackages                             devinci/devinci-behat-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. devinci/devinci-behat-extension

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

devinci/devinci-behat-extension
===============================

Provides extra behat goodies.

0.1.0(10y ago)17598.0k↑54.7%8[6 issues](https://github.com/devinci-code/devinci-behat-extension/issues)[3 PRs](https://github.com/devinci-code/devinci-behat-extension/pulls)MITPHP

Since Jun 14Pushed 2y ago2 watchersCompare

[ Source](https://github.com/devinci-code/devinci-behat-extension)[ Packagist](https://packagist.org/packages/devinci/devinci-behat-extension)[ RSS](/packages/devinci-devinci-behat-extension/feed)WikiDiscussions master Synced 2d ago

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

devinci-behat-extension
=======================

[](#devinci-behat-extension)

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

[](#installation)

### Composer

[](#composer)

`composer require devinci/devinci-behat-extension dev-master`

### behat.yml

[](#behatyml)

Add the contexts that you want to use to behat.yml

```
default:
  suites:
     default:
        contexts:
          - FeatureContext
          - Devinci\DevinciExtension\Context\DebugContext:
              asset_dump_path: %paths.base%/../assets/
          - Devinci\DevinciExtension\Context\JavascriptContext:
              maximum_wait: 30
```

Usage
-----

[](#usage)

### DebugContext

[](#debugcontext)

DebugContext adds some helpful tools for debugging your behat tests.

### Grabbing assets on failures

[](#grabbing-assets-on-failures)

By simply adding the DebugContext in the behat.yml, anytime there is a failure the html will be dumped and a screenshot will be captured andplaced in the configured assets directory. This can be VERY useful to diagnose what went wrong after the tests complete.

### @debugEach and @debugBeforeEach

[](#debugeach-and-debugbeforeeach)

It can be very handy to step through each of the steps of a scenario and get additional debug information as you go like the current url. To break after each step you can tag your scenario with @debugEach which will require you to press enter to advance to the next step. Be careful to delete this step before you commit your work, as it will cause your CI tests to never complete.

@debugBeforeEach works the same way, but will pause before a step is run instead of after.

### Steps available:

[](#steps-available)

- `And grab the html` or `And grab the html with filename :filename` - Allows you to save the current page html to a file instead of waiting for a failure.
- `And grab a screenshot` or `And grab a screenshot with a filename :filename` - If the current driver supports screenshots (Selenium2) then it will grab a screenshot and place it in the configured assets folder.

### JavascriptContext

[](#javascriptcontext)

JavascriptContext adds helpful tools for dealing with JS related tests. Currently it gives some helper functions that allow you to repeatedly try a custom step over and over until a wait timeout is reached. This is very useful for Ajax requests or interacting JS elements on the page.

Also added is a step called `I wait for :text` which will wait up to the maximum wait period for some text to appear on the page. While it's often better to use the helper functions with a custom step, this step shows and example of how that's done, and can be useful as a replacement for the `And I wait` step.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity44

Moderate usage in the ecosystem

Community11

Small or concentrated contributor base

Maturity53

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

Unknown

Total

1

Last Release

3672d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d658718d47508712713f726098a1b8a0bdb5dcb968782ebd6bc67a5b166f827?d=identicon)[frankcarey](/maintainers/frankcarey)

---

Top Contributors

[![keelahnkhan](https://avatars.githubusercontent.com/u/4490530?v=4)](https://github.com/keelahnkhan "keelahnkhan (3 commits)")

---

Tags

testBehat

### Embed Badge

![Health badge](/badges/devinci-devinci-behat-extension/health.svg)

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

###  Alternatives

[drupal/drupal-extension

Drupal extension for Behat

22215.7M173](/packages/drupal-drupal-extension)[drevops/behat-steps

Collection of steps for Behat

27431.3k4](/packages/drevops-behat-steps)[dvdoug/behat-code-coverage

Generate Code Coverage reports for Behat tests

623.9M54](/packages/dvdoug-behat-code-coverage)[polishsymfonycommunity/symfony2-mocker-extension

Behat extension for mocking services defined in the Symfony2 dependency injection container.

26253.7k4](/packages/polishsymfonycommunity-symfony2-mocker-extension)[robertfausk/behat-panther-extension

Symfony Panther extension for Behat

342.0M116](/packages/robertfausk-behat-panther-extension)[genesis/behat-fail-aid

Get more out of your test suite by getting it to work with you when tests fail. Screenshots and more. Works with Goutte and MinkExtension.

271.6M20](/packages/genesis-behat-fail-aid)

PHPackages © 2026

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