PHPackages                             vivait/behat-mysql-dump - 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. vivait/behat-mysql-dump

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

vivait/behat-mysql-dump
=======================

Uses mysqldump to dump the database out to a file when a scenario in behat fails.

0.1(9y ago)116.3kMITPHPPHP ^5.6|^7.0

Since Jan 24Pushed 9y ago1 watchersCompare

[ Source](https://github.com/vivait/behat-mysql-dump)[ Packagist](https://packagist.org/packages/vivait/behat-mysql-dump)[ RSS](/packages/vivait-behat-mysql-dump/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Vivait\\Behat\\DbDump\\Context\\DbDumpContext
=============================================

[](#vivaitbehatdbdumpcontextdbdumpcontext)

This context will dump a database to a file when a scenario in [Behat](http://behat.org/en/latest/) fails.

The filename will be:

`behat-scenario-failed-{scenarioTitle}-{dateStamp}.sql`

So if you have a scenario that was run:

```
Scenario: A user can perform a search with advanced filtering

```

The filename would be along the lines of:

`behat-scenario-failed-A user can perform a search with advanced filtering-20170124113226.sql`

Compatibility / Requirements
----------------------------

[](#compatibility--requirements)

- PHP 5.6 and above, 7.0 and above

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

[](#installation)

`composer require vivait/behat-mysql-dump --dev`

Usage
-----

[](#usage)

Configure Behat by adding the context to your `behat.yml` file

```
default:
    suites:
        mysuite:
            contexts:
                - Vivait\Behat\DbDump\Context\DbDumpContext:
                    - 'database_username_here'
                    - 'database_password_here'
                    - 'database_name_here'
                    - '/output/directory/here'
```

If using the [Behat Symfony 2 Extension](https://github.com/Behat/Symfony2Extension) you can use Symfony parameters like so:

```
default:
    suites:
        mysuite:
            contexts:
                - Vivait\Behat\DbDump\Context\DbDumpContext:
                    - '%%database_user%%'
                    - '%%database_password%%'
                    - '%%database_name%%'
                    - '%%kernel.root_dir%%/logs'
```

Contributing
------------

[](#contributing)

This started as a project internally that we used on some of our projects, if there's new features / ideas you think could be useful please feel free to suggest them, or submit a PR!

Although this project is small, openness and inclusivity are taken seriously. To that end the following code of conduct has been adopted.

[Contributor Code of Conduct](CONTRIBUTING.md)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

3443d ago

### Community

Maintainers

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

---

Top Contributors

[![kieljohn](https://avatars.githubusercontent.com/u/1641880?v=4)](https://github.com/kieljohn "kieljohn (1 commits)")

### Embed Badge

![Health badge](/badges/vivait-behat-mysql-dump/health.svg)

```
[![Health](https://phpackages.com/badges/vivait-behat-mysql-dump/health.svg)](https://phpackages.com/packages/vivait-behat-mysql-dump)
```

###  Alternatives

[brianium/paratest

Parallel testing for PHP

2.5k129.9M913](/packages/brianium-paratest)[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.3M977](/packages/phpro-grumphp)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k41.3M38.9k](/packages/orchestra-testbench)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k27.9M2.2k](/packages/infection-infection)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[drupal/drupal-extension

Drupal extension for Behat

21115.5M166](/packages/drupal-drupal-extension)

PHPackages © 2026

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