slashrsm/behat-screenshot

Screenshot extension for behat

1.0 2015-11-20 20:18 UTC

This package is not auto-updated.

Last update: 2024-12-25 21:20:23 UTC


README

Imporves screenshots functionality of Behat. Can automatically create screenshots after failed or all steps.

Quick start

  1. Install using Composer:

    curl -sS https://getcomposer.org/installer | php
    php composer.phar require slashrsm/behat-screenshot='~1.0'
  2. In the behat.yml add configuration for screenshot extension. Extenstion comes with three configuration variables, which are pretty self explanatory:

...
  extensions:
    slashrsm\screenshot\ScreenshotExtension:
      enabled_always: false
      enabled_on_fail: true
      screenshot_path: '/path/to/screenshots'
  1. In the behat.yml add ScreenshotContext to the contexts section:
...
  contexts:
    ...
    - slashrsm\screenshot\ScreenshotExtension\Context\ScreenshotContext