xedi/laravel-behat

Laravel Extension for Behat
1,551 1
Install
composer require xedi/laravel-behat
Latest Version:3.0.0
PHP:>=5.4
License:MIT
Last Updated:Jul 29, 2021
Links: GitHub  ·  Packagist
Maintainer: xedi-ltd

laravel-behat

Behat Extension compatible with both Laravel and Lumen


Getting Started

Installation

Pull in the extension using composer

composer require xedi/laravel-behat --dev

:information_source: If you are using Lumen you will need to register the ServiceProvider yourself for access to the Artisan commands.

// bootstrap/app.php
if (class_exists("Xedi\\Behat\\ServiceProvider")) {
    $app->register("Xedi\\Behat\\ServiceProvider");
}

Setup

Next you need to configure behat.

php artisan make:behat-yaml

It is recommended that you use a .env.behat environment file and set the LOG_DRIVER to single.

Then, you need to initialize a behat within your repository.

vendor/bin/behat --init

If everything is working, it will create a "features" directory within your repository.

Running the tests

To run the test run behat as normal.

vendor/bin/behat

Alternatively, you can run individual files:

vendor/bin/behat -- features/Example.feature

You can also run specific Scenarios by specifying the line number it begins on:

vendor/bin/behat -- features/Example.feature:54

For more information, check out the help documentation using the --help option

Related Packages

teoble/behat-lumen-extension

Lumen extension for Behat

5,388 3
arisro/behat-lumen-extension

Lumen extension for Behat

2,500 5
laracasts/behat-laravel-extension

Laravel extension for Behat

1,290,454 260
cerbero/behat-laravel-extension

Laravel extension for Behat

81 0

Version History

Version Released PHP Laravel License
3.0.0 >=5.4 ^7.0 MIT
2.0.101 >=5.4 >=5 MIT
2.0.0 >=5.4 >=5 MIT
1.0.11 >=5.4 >=5 MIT
1.0.10 >=5.4 >=5 MIT