PHPackages                             guilhermeguitte/behat-laravel - 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. guilhermeguitte/behat-laravel

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

guilhermeguitte/behat-laravel
=============================

Adding BDD test with Behat to laravel 4

v1.5(11y ago)6519.1k↓84.6%12[7 issues](https://github.com/GuilhermeGuitte/behat-laravel/issues)MITPHPPHP &gt;=5.3.0

Since Mar 18Pushed 11y ago3 watchersCompare

[ Source](https://github.com/GuilhermeGuitte/behat-laravel)[ Packagist](https://packagist.org/packages/guilhermeguitte/behat-laravel)[ RSS](/packages/guilhermeguitte-behat-laravel/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (6)Versions (4)Used By (0)

Behat-Laravel
=============

[](#behat-laravel)

[![ProjectStatus](https://camo.githubusercontent.com/ce725717866c6efc02df8e0c959436c6f218c25328497ea033ca318eeac8f200/687474703a2f2f7374696c6c6d61696e7461696e65642e636f6d2f4775696c6865726d654775697474652f62656861742d6c61726176656c2e706e67)](http://stillmaintained.com/GuilhermeGuitte/behat-laravel)

Behat-Laravel is a solution to test your application using the BDD methodology.

Features:
---------

[](#features)

*Current:*

- Create the folder structure to receive the Acceptance tests.
- Run the acceptance test.
- Ingration with [Zizaco/TestCases-Laravel](https://github.com/Zizaco/testcases-laravel), that provide the useful methods test your application.

Quick start:
------------

[](#quick-start)

### Required setup

[](#required-setup)

In the `require` key of `composer.json` file add the following:

```
"guilhermeguitte/behat-laravel": "dev-master"

```

Run the Composer update comand

```
$ composer update

```

In your `config/app.php` add `'GuilhermeGuitte\BehatLaravel\BehatLaravelServiceProvider'` to the end of the `$providers` array

```
'providers' => array(

    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    ...
    'GuilhermeGuitte\BehatLaravel\BehatLaravelServiceProvider',

),

```

Install `selenium`.

Commands
--------

[](#commands)

Now generate Behat's structure folder using the follow artisan's command:

```
$ php artisan behat:install

```

You can pass the test path if you are not using the `app/tests` folder.

```
$ php artisan behat:install --test_path==your/test/path

```

Generating Documentation
------------------------

[](#generating-documentation)

To create a document in html just run:

```
$ php artisan behat:html # will create a file at application's root

```

or

```
$ php artisan behat:html --out path/you/need/doc.html # will create a file specified path

```

Structure
---------

[](#structure)

Adding Contexts
---------------

[](#adding-contexts)

When you create a `context` in the folder `tests\acceptance\contexts` these files will be included by `FeatureContext` preventing the specification of files that will be used by the tests.

```
$ php artisan behat:feature --name=NameOfFeature

```

Will create:

```
    app\tests\acceptance\contexts\NameOfFeatureContext.php
    app\tests\acceptance\features\name_of_feature\name_of_feature.feature

```

Running tests
-------------

[](#running-tests)

To run all test, you can use the follow command:

```
$ php artisan behat:run

```

To run tests for specific features, you can specify the name of the folder or the .feature file:

```
$ php artisan behat:run name_of_feature
$ php artisan behat:run name_of_feature/name_of_feature.feature
$ php artisan behat:run name_of_feature/separated_scenarios.feature

```

If you have large feature files and you only want to run a specific senario use

```
$ php artisan behat:run --name="name of feature"

```

Laravel behat currently supports the following behat command line options:

```
 --format (-f)        How to format features. pretty is default.
                      Default formatters are:
                      - pretty: Prints the feature as is.
                      - progress: Prints one character per step.
                      - html: Generates a nice looking HTML report.
                      - junit: Generates a report similar to Ant+JUnit.
                      - failed: Prints list of failed scenarios.
                      - snippets: Prints only snippets for undefined steps.

 --no-snippets        Do not print out snippets
 --profile (-p)       Specify config profile to use.
 --name               Only execute the feature elements which match
                      part of the given name or regex.

```

License
-------

[](#license)

Behat-Laravel is free software distributed under the terms of the MIT license.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 60% 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 ~141 days

Total

2

Last Release

4347d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7479d39c08e4ad65653355a32f925838a3daa896040a8a71d00148c4bb36722a?d=identicon)[GuilhermeGuitte](/maintainers/GuilhermeGuitte)

---

Top Contributors

[![GuilhermeGuitte](https://avatars.githubusercontent.com/u/1062859?v=4)](https://github.com/GuilhermeGuitte "GuilhermeGuitte (39 commits)")[![jakubwrona](https://avatars.githubusercontent.com/u/7712334?v=4)](https://github.com/jakubwrona "jakubwrona (9 commits)")[![Zizaco](https://avatars.githubusercontent.com/u/777635?v=4)](https://github.com/Zizaco "Zizaco (8 commits)")[![alnutile](https://avatars.githubusercontent.com/u/365385?v=4)](https://github.com/alnutile "alnutile (2 commits)")[![pete-otaqui](https://avatars.githubusercontent.com/u/132719?v=4)](https://github.com/pete-otaqui "pete-otaqui (2 commits)")[![mtsunu](https://avatars.githubusercontent.com/u/4941448?v=4)](https://github.com/mtsunu "mtsunu (1 commits)")[![arnold-almeida](https://avatars.githubusercontent.com/u/53209?v=4)](https://github.com/arnold-almeida "arnold-almeida (1 commits)")[![rhynodesigns](https://avatars.githubusercontent.com/u/2198266?v=4)](https://github.com/rhynodesigns "rhynodesigns (1 commits)")[![stones](https://avatars.githubusercontent.com/u/1442810?v=4)](https://github.com/stones "stones (1 commits)")[![leberknecht](https://avatars.githubusercontent.com/u/1165177?v=4)](https://github.com/leberknecht "leberknecht (1 commits)")

---

Tags

testlaravelBDDBehatilluminate

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/guilhermeguitte-behat-laravel/health.svg)

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

###  Alternatives

[drupal/drupal-extension

Drupal extension for Behat

22215.7M167](/packages/drupal-drupal-extension)[dvdoug/behat-code-coverage

Generate Code Coverage reports for Behat tests

623.9M50](/packages/dvdoug-behat-code-coverage)[laracasts/behat-laravel-extension

Laravel extension for Behat

2611.3M13](/packages/laracasts-behat-laravel-extension)[polishsymfonycommunity/symfony2-mocker-extension

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

26253.5k4](/packages/polishsymfonycommunity-symfony2-mocker-extension)[leanphp/behat-code-coverage

Generate Code Coverage reports for Behat tests

50360.7k2](/packages/leanphp-behat-code-coverage)[zizaco/testcases-laravel

Some classes to help write tests for laravel 4 applications

4650.5k2](/packages/zizaco-testcases-laravel)

PHPackages © 2026

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