PackageTrack
Sign in Get early access

drevops/behat-screenshot

Behat extension and step definitions to create HTML and image screenshots on demand or when tests fail

2.6.0 1.8M downloads/mo #2774 most downloaded on Packagist drevops/behat-screenshot

What this package is like to depend on

Last release 6 days ago

18 Aug 2026

Ships fairly regularly

a new release about every 2 months

Some releases are documented

notes for 10 of 33 stable releases

Nothing withdrawn

no release was ever pulled

9 years old

33 releases · first in 2017

7 releases in the last 12 months

see the full history below

Release timeline

33 releases · Apr 2017 to Aug 2026
2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 33
  1. 2.6.0 18 Aug 2026
    Release notes

    What's new since 2.5.0

    Highlights

    • Aligned the documentation with the code, tidied source comments, and added a security policy. @AlexSkrypnyk (#267)
      Copying the documented filename_pattern default produced colliding filenames, because the README and behat.yml.dist showed lowercase {datetime:u} (microseconds, which render as 000000 for an integer timestamp) instead of the real {datetime:U} Unix timestamp, and the custom-information example called an addInfo() method that does not exist rather than appendInfo(). The info_types default, the {step_name} casing rule and the URL token examples are also corrected to match what the code actually produces, the documented Chromium debugging endpoint now binds to 127.0.0.1 instead of the whole local network, and the project gains a SECURITY.md reporting policy.

    • [#264] Added a tag and an environment variable to disable animated screenshots. @AlexSkrypnyk (#266)
      With animation.enabled: true there was no way to exempt an individual scenario, and animation roughly doubles wall time because it forces a full-page capture after every passed step - one 215-step scenario measured 1m53s without animation against 3m43s with it, producing a 58MB GIF. A scenario or feature can now carry @screenshots:animated:skip to opt out, and BEHAT_SCREENSHOT_ANIMATION_SKIP disables animation for an entire run without touching feature files or configuration. Scopes resolve most-specific first, so a feature-level opt-out can be overridden by a scenario-level opt-in.

    • Updated scaffold to 1.2.0 and fixed the untested dependency lower bounds. @AlexSkrypnyk (#263)
      The declared lower bounds had never been installed or tested, so CI's new lowest dependency dimension - now running both dependency sets across PHP 8.2 to 8.5 - failed immediately on floors that could not resolve. The runtime floors are raised to versions the suite actually passes on, most notably behat/behat from ^3.13.0 to ^3.32.0, and behat/mink is now declared in require rather than relied on arriving transitively through friends-of-behat/mink-extension. Contributor setup also moves out of README.md into a new CONTRIBUTING.md, with the documented unit-test command corrected to composer test and the headless browser instructions installing Chromium rather than ChromeDriver.

    Other changes

    • Update all dependencies @renovate[bot] (#265)

    • Capped 'dvdoug/behat-code-coverage' below 5.4 to keep PHP 8.2 support. @AlexSkrypnyk (#268)
      dvdoug/behat-code-coverage 5.4.0 raised its own requirements to PHP ^8.3 and phpunit/php-code-coverage ^12.3, so all 8 CI jobs failed at composer install before a single test ran. Because that was a semver MINOR bump it slipped past the existing major-update guard, so renovate.json now caps the package at <5.4 to keep PHP 8.2 support. It is a development dependency, so nothing changes for consumers of the package.

    Full Changelog: 2.5.0...2.6.0

    Open source →
  2. 2.5.0 17 Aug 2026
    Release notes

    What's new since 2.4.2

    Breaking changes

    • Boolean options in behat.yml are now validated as booleans. @AlexSkrypnyk (#258)
      on_failed, purge, always_fullscreen and on_every_step no longer accept quoted values or integers: 'true', 'false', 0 and 1 are rejected with a configuration error, so replace them with unquoted true or false. Check for on_failed: 'false' in particular - it used to be read as a non-empty string, which is truthy, so it silently turned failure screenshots on rather than off. See #259.

    • Animated GIF frames are written at the size they were captured, not padded to the tallest frame. @AlexSkrypnyk (#242)
      One full-page capture used to pad every other frame up to its height before encoding, so on a real suite (#241) a scenario finished its last step and then sat for 178s building a 64MB GIF. Frames are now encoded at their own size, cutting a 100-step scenario containing one 19090px page from 67.6s to 3.58s and leaving nothing blocking at scenario end. The animation looks the same, but the protected normaliseFrames(), pad() and $animationFrames members were removed - if you subclass AnimatedGif or ScreenshotContext and use them, switch to the new addFrame() and render() methods.

    • Tokens inside a step name are now resolved in screenshot filenames. @AlexSkrypnyk (#258)
      A step whose name contains a token - Visit {url} page, say - used to produce a filename with the literal text {url} in it, because the tokenizer never rescanned its own replacements. Those tokens now resolve, so filenames change for any step name containing braces; all other filenames are unchanged. See #260.

    Highlights

    • The browser window is now restored when a fullscreen capture fails. @AlexSkrypnyk (#258)
      Taking a fullscreen screenshot enlarges the browser window to the full page height and shrinks it back afterwards, but a driver error during the capture skipped the restore entirely. The window then stayed at full page height for the rest of the scenario, so every later screenshot came out at the wrong size, with nothing in the log explaining why. See #261.

    • [#243] Added PHP 8.5 to the test matrix. @AlexSkrypnyk (#246)
      PHP 8.5 now runs as a first-class, must-pass CI leg alongside 8.2, 8.3 and 8.4, covering both the PHPUnit and Behat suites. The calls 8.5 newly deprecates - imagedestroy() and Reflection*::setAccessible(), no-ops since PHP 8.0 and 8.1 respectively - were removed, so the suite runs with no deprecation notices. The >=8.2 floor is unchanged, so the supported range widens rather than shifts.

    • [#241] Added a profiler that measures animated GIF assembly cost and memory. @AlexSkrypnyk (#244)
      composer profile replays a scenario of configurable length through the real Behat hooks with the browser replaced by prepared images, timing the steps separately from the scenario-end GIF assembly and reporting peak memory alongside pixels captured versus pixels encoded. It is excluded from the default suite, so composer test is unaffected. This is what turned the report in #241 into numbers, and what the fix above was measured against.

    • New public constants on ScreenshotContext. @AlexSkrypnyk (#258)
      The default window size, the screenshots and screenshots:animated tag names, and the animation frame delay are now public constants instead of repeated literals, so subclasses and tests can reference them. The frame delay is the one with a functional consequence: its default was previously written out in two places free to drift apart, and is now defined once and read from both. See #262.

    Other changes

    • Converged naming, structure, API shape and comments across the codebase. @AlexSkrypnyk (#247)
      An internal pass unifying how the same idea is spelled in different parts of the codebase, and tidying source comments onto one technical register. No public API changed and no behaviour changed, so upgrading needs no action - it is listed only because it touches most files in the repository.

    • Update browser-actions/setup-chrome digest to 48ad923 @renovate[bot] (#245)

    • Update toshimaru/auto-author-assign action to v3.1.0 @renovate[bot] (#240)

    • Update selenium/standalone-chromium Docker tag to v151 @renovate[bot] (#239)

    • Update release-drafter/release-drafter digest to 34d8067 @renovate[bot] (#238)

    • Update actions/checkout digest to 3d3c42e @renovate[bot] (#237)

    • Update release-drafter/release-drafter digest to eada3c9 @renovate[bot] (#236)

    • Update selenium/standalone-chromium Docker tag to v150 @renovate[bot] (#235)

    Full Changelog: 2.4.2...2.5.0

    Open source →
  3. 2.4.2 10 Jul 2026
    Release notes

    What's new since 2.4.1

    Full Changelog: 2.4.1...2.4.2

    @AlexSkrypnyk, @renovate[bot] and renovate[bot]

    Open source →
  4. 2.4.1 20 Jun 2026
    Release notes

    What's new since 2.4.0

    • Fixed animated GIF frames being stretched to the first frame's dimensions. @AlexSkrypnyk (#227)

    Full Changelog: 2.4.0...2.4.1

    @AlexSkrypnyk

    Open source →
  5. 2.4.0 20 Jun 2026
    Release notes

    What's new since 2.3.0

    Full Changelog: 2.3.0...2.4.0

    @AlexSkrypnyk, @renovate[bot] and renovate[bot]

    Open source →
  6. 2.3.0 07 Apr 2026
    Release notes

    Breaking changes 💥

    • fullscreen_algorithm configuration option was removed. You would need to update your behat.yml file to remove this option.

    What's new since 2.2.0

    Full Changelog: 2.2.0...2.3.0

    @AlexSkrypnyk, @renovate[bot] and renovate[bot]

    Open source →
  7. 2.2.0 06 Oct 2025
    Release notes

    What's new since 2.1.1

    Full Changelog: 2.1.1...2.2.0

    @AlexSkrypnyk, @renovate[bot] and renovate[bot]

    Open source →
  8. 2.1.1 07 May 2025
    Release notes

    What's new since 2.1.0

    Full Changelog: 2.1.0...2.1.1

    @AlexSkrypnyk, @renovate[bot] and renovate[bot]

    Open source →
  9. 2.1.0 08 Apr 2025
    Release notes

    What's new since 2.0.0

    💥 Fullscreen screenshots are here!

    Full Changelog: 2.0.0...2.1.0

    @AlexSkrypnyk, @renovate[bot] and renovate[bot]

    Open source →
  10. 2.0.0 19 Jan 2025
    Release notes

    Stable API, multi-driver support and additional information in screenshots.

    What's new since 1.6.0

    Config migration:

    fail -> on_failed
    fail_prefix - > failed_prefix
    filenamePattern -> filename_pattern
    filenamePatternFailed -> filename_pattern_failed

    Additional information in screenshots

    Full Changelog: 1.6.0...2.0.0

    @AlexSkrypnyk, @renovate, @renovate[bot], @richardgaunt, @xurizaemon

    Open source →
  11. 1.6.0 04 Nov 2024

    Nothing published for this version

  12. 1.5.0 19 Apr 2024

    Nothing published for this version

  13. 1.4.0 12 Mar 2024

    Nothing published for this version

  14. 1.3.0 02 Jan 2024

    Nothing published for this version

  15. 1.2.0 06 Oct 2022

    Nothing published for this version

  16. 1.1.0 04 Sep 2021

    Nothing published for this version

  17. 1.0.0 27 Jul 2021

    Nothing published for this version

  18. 0.8.0 27 Jul 2021

    Nothing published for this version

  19. 0.7.4 12 May 2021

    Nothing published for this version

  20. 0.7.3 12 Mar 2020

    Nothing published for this version

  21. 0.7.2 30 May 2018

    Nothing published for this version

  22. 0.7.1 26 Mar 2018

    Nothing published for this version

  23. 0.7.0 08 Jan 2018

    Nothing published for this version

  24. 0.6.2 07 Aug 2017

    Nothing published for this version

  25. 0.6.1 29 Jun 2017

    Nothing published for this version

  26. 0.6.0 28 Jun 2017

    Nothing published for this version

  27. 0.5.0 26 May 2017

    Nothing published for this version

  28. 0.4.1 25 May 2017

    Nothing published for this version

  29. 0.4.0 19 May 2017

    Nothing published for this version

  30. 0.3.1 19 May 2017

    Nothing published for this version

  31. 0.3.0 17 May 2017

    Nothing published for this version

  32. 0.2.0 30 Apr 2017

    Nothing published for this version

  33. 0.1.0 19 Apr 2017

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive