friends-of-behat / mink-debug-extension
Debug extension for Behat
Installs: 3 651 845
Dependents: 238
Suggesters: 0
Security: 0
Stars: 206
Watchers: 12
Forks: 12
Open Issues: 2
Type:behat-extension
Requires
- php: >=7.4
- behat/behat: ^3.5
- behat/mink-extension: ^2.3
Requires (Dev)
- behat/mink-goutte-driver: ^1.2
- behat/mink-selenium2-driver: ^1.4
- dmore/behat-chrome-extension: ^1.3
- dmore/chrome-mink-driver: ^2.7
- symfony/process: ^4.4 || ^5.2
README
MinkDebugExtension is a Behat extension made for debugging and logging Mink related data after every failed step. It is especially useful while running tests on continuous integration server like Travis. While using appropriate driver, you can also save screenshots just after the failure.
Installation
Assuming you already have Composer:
composer require friends-of-behat/mink-debug-extension
Then you only need to configure your Behat profile:
default: extensions: FriendsOfBehat\MinkDebugExtension: directory: directory-where-to-save-logs
Configuration reference
Under FriendsOfBehat\MinkDebugExtension
there are three options to be configured:
directory
(required to enable extension) - contains path to directory that will contain generated logs. Use the variable%paths.base%
to refer to the directory where yourbehat.yml
isscreenshot
(defaultfalse
) - whether to save screenshots if using supporting driverclean_start
(defaulttrue
) - whether to clean your existing logs on each Behat execution
Testing
In order to test the extensions run:
composer install bin/behat --strict
Authors
MinkDebugExtension was originally created by Kamil Kokot. See the list of contributors.