library behat-screenshot
Screenshot extension for behat
slashrsm/behat-screenshot
Screenshot extension for behat
- Friday, November 20, 2015
- by slashrsm
- Repository
- 1 Watchers
- 0 Stars
- 42 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
Behat screenshot extension
Imporves screenshots functionality of Behat. Can automatically create screenshots
after failed or all steps., (*1)
Quick start
-
Install using Composer:, (*2)
bash
curl -sS https://getcomposer.org/installer | php
php composer.phar require slashrsm/behat-screenshot='~1.0'
, (*3)
-
In the behat.yml
add configuration for screenshot extension. Extenstion
comes with three configuration variables, which are pretty self explanatory:, (*4)
yaml
...
extensions:
slashrsm\screenshot\ScreenshotExtension:
enabled_always: false
enabled_on_fail: true
screenshot_path: '/path/to/screenshots'
, (*5)
-
In the behat.yml
add ScreenshotContext to the contexts section:, (*6)
``` yaml
...
contexts:
..., (*7)
- slashrsm\screenshot\ScreenshotExtension\Context\ScreenshotContext
```