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 1mo ago

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 49% 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

3392d 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

[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.0k](/packages/orchestra-testbench)[liuggio/fastest

Simple parallel testing execution... with some goodies for functional tests.

4825.6M26](/packages/liuggio-fastest)[friends-of-behat/variadic-extension

Variadic support for behat context arguments

2286.0M441](/packages/friends-of-behat-variadic-extension)[magento/magento2-functional-testing-framework

Magento2 Functional Testing Framework

15511.5M30](/packages/magento-magento2-functional-testing-framework)[orchestra/workbench

Workbench Companion for Laravel Packages Development

8017.0M43](/packages/orchestra-workbench)[drupal/drupal-driver

A collection of reusable Drupal drivers

6715.8M18](/packages/drupal-drupal-driver)

PHPackages © 2026

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