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 2026Releases
latest 33-
2.6.018 Aug 2026Release notes
Open source →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 documentedfilename_patterndefault produced colliding filenames, because the README andbehat.yml.distshowed lowercase{datetime:u}(microseconds, which render as000000for an integer timestamp) instead of the real{datetime:U}Unix timestamp, and the custom-information example called anaddInfo()method that does not exist rather thanappendInfo(). Theinfo_typesdefault, 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 to127.0.0.1instead of the whole local network, and the project gains aSECURITY.mdreporting policy. -
[#264] Added a tag and an environment variable to disable animated screenshots. @AlexSkrypnyk (#266)
Withanimation.enabled: truethere 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:skipto opt out, andBEHAT_SCREENSHOT_ANIMATION_SKIPdisables 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 newlowestdependency 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 notablybehat/behatfrom^3.13.0to^3.32.0, andbehat/minkis now declared inrequirerather than relied on arriving transitively throughfriends-of-behat/mink-extension. Contributor setup also moves out ofREADME.mdinto a newCONTRIBUTING.md, with the documented unit-test command corrected tocomposer testand 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-coverage5.4.0 raised its own requirements to PHP^8.3andphpunit/php-code-coverage ^12.3, so all 8 CI jobs failed atcomposer installbefore a single test ran. Because that was a semver MINOR bump it slipped past the existing major-update guard, sorenovate.jsonnow caps the package at<5.4to 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
-
-
2.5.017 Aug 2026Release notes
Open source →What's new since 2.4.2
Breaking changes
-
Boolean options in
behat.ymlare now validated as booleans. @AlexSkrypnyk (#258)on_failed,purge,always_fullscreenandon_every_stepno longer accept quoted values or integers:'true','false',0and1are rejected with a configuration error, so replace them with unquotedtrueorfalse. Check foron_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 protectednormaliseFrames(),pad()and$animationFramesmembers were removed - if you subclassAnimatedGiforScreenshotContextand use them, switch to the newaddFrame()andrender()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()andReflection*::setAccessible(), no-ops since PHP 8.0 and 8.1 respectively - were removed, so the suite runs with no deprecation notices. The>=8.2floor 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 profilereplays 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, socomposer testis 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, thescreenshotsandscreenshots:animatedtag 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
-
-
2.4.210 Jul 2026Release notes
Open source →What's new since 2.4.1
- Excluded gherkinlint.json from distribution. @AlexSkrypnyk (#233)
- Fixed coding standards violations reported by 'composer lint'. @AlexSkrypnyk (#234)
- Update actions/cache digest to 55cc834 @renovate[bot] (#232)
- Update release-drafter/release-drafter digest to 4d75298 @renovate[bot] (#231)
- Update release-drafter/release-drafter digest to 73b95fa @renovate[bot] (#230)
- Update all dependencies (major) @renovate[bot] (#229)
- Update all dependencies (major) @renovate[bot] (#228)
Full Changelog: 2.4.1...2.4.2
@AlexSkrypnyk, @renovate[bot] and renovate[bot]
-
2.4.120 Jun 2026Release notes
Open source →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
-
2.4.020 Jun 2026Release notes
Open source →What's new since 2.3.0
- [#40] Added animated GIF recording from per-step screenshots. @AlexSkrypnyk (#226)
- Update all dependencies to v7 @renovate[bot] (#225)
- Update all dependencies to ed4bc48 @renovate[bot] (#224)
- Update all dependencies to v3.0.3 @renovate[bot] (#223)
- Update all dependencies to f3e473d @renovate[bot] (#222)
- Update all dependencies to v7 @renovate[bot] (#221)
- Update all dependencies to df4cb1c @renovate[bot] (#220)
- Update mxschmitt/action-tmate digest to 35b54af @renovate[bot] (#219)
- Update release-drafter/release-drafter digest to 693d20e @renovate[bot] (#218)
- Update selenium/standalone-chromium Docker tag to v148 @renovate[bot] (#217)
- Update codecov/codecov-action digest to e79a696 @renovate[bot] (#216)
- Update shivammathur/setup-php digest to 7c071df @renovate[bot] (#215)
- Update release-drafter/release-drafter digest to c2e2804 @renovate[bot] (#214)
- Update browser-actions/setup-chrome digest to 2e1d749 @renovate[bot] (#213)
- Update release-drafter/release-drafter digest to 563bf13 @renovate[bot] (#212)
- Update toshimaru/auto-author-assign action to v3.0.2 @renovate[bot] (#211)
- Update actions/cache digest to 27d5ce7 @renovate[bot] (#210)
- Update selenium/standalone-chromium:147.0 Docker digest to e80834f @renovate[bot] (#209)
- Update selenium/standalone-chromium Docker tag to v147 @renovate[bot] (#208)
- Update actions/upload-artifact digest to 043fb46 @renovate[bot] (#207)
- Update release-drafter/release-drafter digest to 5de9358 @renovate[bot] (#206)
Full Changelog: 2.3.0...2.4.0
@AlexSkrypnyk, @renovate[bot] and renovate[bot]
-
2.3.007 Apr 2026Release notes
Open source →Breaking changes 💥
fullscreen_algorithmconfiguration option was removed. You would need to update yourbehat.ymlfile to remove this option.
What's new since 2.2.0
- [#173] Removed deprecated 'fullscreen_algorithm' option. @AlexSkrypnyk (#205)
- Update codecov/codecov-action action to v6 @renovate[bot] (#204)
- Update all dependencies @renovate[bot] (#202)
- Update release-drafter/release-drafter digest to 44a942e @renovate[bot] (#201)
- Pin dependencies @renovate[bot] (#200)
- Update Vortex Ecosystem badge @AlexSkrypnyk (#197)
- Update renovate config @AlexSkrypnyk (#198)
- Update dependency drupal/coder to v9 @renovate[bot] (#196)
- Update release-drafter/release-drafter action to v7 @renovate[bot] (#195)
- Update dependency drevops/phpcs-standard to ^0.7.0 @renovate[bot] (#194)
- Update actions/upload-artifact action to v7 @renovate[bot] (#193)
- Update selenium/standalone-chromium Docker tag to v145 @renovate[bot] (#192)
- Update selenium/standalone-chromium Docker tag to v144 @renovate[bot] (#190)
- Update toshimaru/auto-author-assign action to v3.0.1 @renovate[bot] (#189)
- Update toshimaru/auto-author-assign action to v3 @renovate[bot] (#188)
- Update toshimaru/auto-author-assign action to v2.1.2 @renovate[bot] (#187)
- Update actions/upload-artifact action to v6 @renovate[bot] (#186)
- Update actions/cache action to v5 @renovate[bot] (#185)
- Update selenium/standalone-chromium Docker tag to v143 @renovate[bot] (#183)
- Update dependency drevops/phpcs-standard to ^0.6.0 @renovate[bot] (#181)
- Update dependency drevops/phpcs-standard to ^0.5.0 @renovate[bot] (#180)
- Update actions/checkout action to v6 @renovate[bot] (#179)
- Update dependency drevops/phpcs-standard to ^0.4.0 @renovate[bot] (#178)
- Update dependency drevops/phpcs-standard to ^0.3.0 @renovate[bot] (#177)
- Update selenium/standalone-chromium Docker tag to v142 @renovate[bot] (#176)
- Update actions/upload-artifact action to v5 @renovate[bot] (#174)
- Fixed coding standards. @AlexSkrypnyk (#175)
Full Changelog: 2.2.0...2.3.0
@AlexSkrypnyk, @renovate[bot] and renovate[bot]
-
2.2.006 Oct 2025Release notes
Open source →What's new since 2.1.1
- Removed
fullscreen_algorithmconfig option in favour ofresize. @AlexSkrypnyk (#172) - [#165] Added
on_every_stepoption and@screenshotstag support to capture screenshots on each step. @AlexSkrypnyk (#171) - [#166] Fixed triggering a full screen screenshot in the test will not resize the window back to the original size. @AlexSkrypnyk (#170)
- Update selenium/standalone-chromium Docker tag to v141 @renovate[bot] (#168)
- Updated tests to be compatible with the latest Behat. @AlexSkrypnyk (#169)
- Update selenium/standalone-chromium Docker tag to v140 @renovate[bot] (#167)
- Update selenium/standalone-chromium Docker tag to v139 @renovate[bot] (#164)
- Update actions/checkout action to v5 @renovate[bot] (#163)
- Update browser-actions/setup-chrome action to v2 @renovate[bot] (#162)
- Update selenium/standalone-chromium Docker tag to v138 @renovate[bot] (#161)
- Update selenium/standalone-chromium Docker tag to v137 @renovate[bot] (#160)
Full Changelog: 2.1.1...2.2.0
@AlexSkrypnyk, @renovate[bot] and renovate[bot]
- Removed
-
2.1.107 May 2025Release notes
Open source →What's new since 2.1.0
- Updated default fullscreen algorithm to use
resize. @AlexSkrypnyk (#159) - Update selenium/standalone-chromium Docker tag to v136 @renovate[bot] (#158)
- Update selenium/standalone-chromium Docker tag to v135 @renovate[bot] (#156)
Full Changelog: 2.1.0...2.1.1
@AlexSkrypnyk, @renovate[bot] and renovate[bot]
- Updated default fullscreen algorithm to use
-
2.1.008 Apr 2025Release notes
Open source →What's new since 2.0.0
💥 Fullscreen screenshots are here!
- [#31] Added support for fullscreen screenshots. @AlexSkrypnyk (#155)
- Fixed coverage. @AlexSkrypnyk (#154)
- Improves code quality and fixed PHPUnit configuration. @AlexSkrypnyk (#153)
- Update selenium/standalone-chromium Docker tag to v134 @renovate[bot] (#151)
- Fixed coding standards. @AlexSkrypnyk (#152)
- Update selenium/standalone-chromium Docker tag to v133 @renovate[bot] (#150)
- Update selenium/standalone-chromium Docker tag to v132 @renovate[bot] (#148)
Full Changelog: 2.0.0...2.1.0
@AlexSkrypnyk, @renovate[bot] and renovate[bot]
-
2.0.019 Jan 2025Release notes
Open source →Stable API, multi-driver support and additional information in screenshots.
What's new since 1.6.0
- Updated extension options to be consistent. @AlexSkrypnyk (#147)
- Refactored to have a consistent interface. @AlexSkrypnyk (#146)
- [#43] Fixed compatibility with Drivers other than Selenium. @AlexSkrypnyk @xurizaemon (#144)
- Allow more information on screenshots. @richardgaunt @AlexSkrypnyk (#140) (#143)
- [#132] Replaced URL-encoded characters in the screenshot file names. @AlexSkrypnyk (#145)
- Updated code formatting and tests. @AlexSkrypnyk (#142)
- Update dependency drevops/behat-phpserver to v2 @renovate (#141)
- Updated PHPStan and Rector to v2. @AlexSkrypnyk (#139)
- Update dependency opis/closure to v4 @renovate (#138)
- Update codecov/codecov-action action to v5 @renovate (#135)
- Update selenium/standalone-chromium Docker tag to v131 @renovate (#136)
Config migration:
fail->on_failed
fail_prefix- >failed_prefix
filenamePattern->filename_pattern
filenamePatternFailed->filename_pattern_failedAdditional information in screenshots
Full Changelog: 1.6.0...2.0.0
@AlexSkrypnyk, @renovate, @renovate[bot], @richardgaunt, @xurizaemon
-
1.6.004 Nov 2024Nothing published for this version
-
1.5.019 Apr 2024Nothing published for this version
-
1.4.012 Mar 2024Nothing published for this version
-
1.3.002 Jan 2024Nothing published for this version
-
1.2.006 Oct 2022Nothing published for this version
-
1.1.004 Sep 2021Nothing published for this version
-
1.0.027 Jul 2021Nothing published for this version
-
0.8.027 Jul 2021Nothing published for this version
-
0.7.412 May 2021Nothing published for this version
-
0.7.312 Mar 2020Nothing published for this version
-
0.7.230 May 2018Nothing published for this version
-
0.7.126 Mar 2018Nothing published for this version
-
0.7.008 Jan 2018Nothing published for this version
-
0.6.207 Aug 2017Nothing published for this version
-
0.6.129 Jun 2017Nothing published for this version
-
0.6.028 Jun 2017Nothing published for this version
-
0.5.026 May 2017Nothing published for this version
-
0.4.125 May 2017Nothing published for this version
-
0.4.019 May 2017Nothing published for this version
-
0.3.119 May 2017Nothing published for this version
-
0.3.017 May 2017Nothing published for this version
-
0.2.030 Apr 2017Nothing published for this version
-
0.1.019 Apr 2017Nothing published for this version