Download the PHP package clevyr/laravel-behat-dusk without Composer
On this page you can find all versions of the php package clevyr/laravel-behat-dusk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-behat-dusk
Laravel Behat Dusk is a simple package with the goal of integrating Behat with Laravel and Laravel Dusk.
This is not a 1:1 implementation of Behat with Laravel, the current goal is to enable a simple and quick way to write Behavior Driven Tests in Laravel Applications.
Pre-requisites
- Laravel 8+
- PHP 8.0+
- Basic Understanding of Behavioral Driven Development and Behat
Installation
Install the Package
The following files will be outputted
- features
- bootstrap
- FeatureContext
- bootstrap
- behat.yml
Testing Environments
Laravel Behat Dusk's environment setup works the exact same way as Laravel Dusk. Take a look at their documentation for environment handling. [https://laravel.com/docs/8.x/dusk#environment-handling]()
Running in Docker
- Create a .env.dusk.local file by running
cp .env .env.dusk.local
and add it to your .gitignore file - Update the following
.env.dusk.local
environment file with the following
If you are not using Laravel Sail use the docker-compose container names for your Application and Selenium Containers.
- Run Laravel Behat Dusk in the app container
sail artisan lbd
Usage
Creating a context file
This creates a Context file in the features/bootstrap
and appends the relevant
configuration data inside the behat.yml
php artisan lbd:make ExampleContext
Running Behat
Run this command to run the Behat test runner, you are able to use all arguments from the Behat CLI
php artisan lbd
Traits
Refresh the database before each Scenario
use RefreshScenario;
Example feature file and context file
login.feature file
FeatureContext.php
Testing
composer test
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Clevyr, Inc
- All Contributors
License
Laravel Behat Dusk is GPL-3.0 License Licensed
All versions of laravel-behat-dusk with dependencies
behat/behat Version ^3.8
illuminate/contracts Version ^8.37
laravel/dusk Version v6.18
spatie/laravel-package-tools Version ^1.9.2
symfony/yaml Version ^5.3