Pros:
Cons:
behat.yml setup and potential PHP extensions (e.g., fileinfo), adding minor operational complexity.xvfb).clear_screenshot_directory: true).browser->screenshot()) may suffice, though they lack Behat’s scenario-level context.fileinfo (common in Laravel environments) and optionally gd/imagick for image processing.symfony/filesystem (v3.x), which is compatible with Laravel’s dependency graph.composer require --dev bex/behat-screenshot
behat.yml with a local driver for initial testing:
default:
extensions:
Bex\Behat\ScreenshotExtension:
image_drivers:
local:
screenshot_directory: "%paths.base%/storage/logs/screenshots"
clear_screenshot_directory: true
uploadpie for Uploadcare or a custom S3 driver) for CI/CD integration.scheduler) or leverage CI artifacts for retention.xvfb or Dockerized PhantomJS.chrome-headless or puppeteer).enabled: false in behat.yml).fileinfo, gd) are installed.failed_steps mode for minimal overhead.failed_scenarios or all_scenarios as needed.- name: Run Behat with Screenshots
run: vendor/bin/behat --config=behat.yml
- name: Upload Screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: behat-screenshots
path: storage/logs/screenshots/
How can I help you explore Laravel packages today?