composer require installation with no Laravel-specific hooks needed.behat.yml setup (directory path, optional screenshot/screenshot flags). No PHP/Laravel service provider or facade integration.clean_start: false could fill storage with redundant logs (mitigated by clean_start: true default).composer require friends-of-behat/mink-debug-extension
behat.yml:
default:
extensions:
FriendsOfBehat\MinkDebugExtension:
directory: "%paths.base%/var/behat-logs"
screenshot: true # Optional
clean_start: true # Recommended for CI
composer.json for exact ranges).screenshot: false) to validate debug output.screenshot: true) if using a supported driver.clean_start: false + many test runs).after_script to upload logs:
- name: Upload Behat logs
uses: actions/upload-artifact@v3
if: failure()
with:
name: behat-logs
path: var/behat-logs/
--tags or extensions like parallel_test_runner) with unique log directories per run.directory: "%paths.base%/var/behat-logs/{{ run_id }}"
| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Log directory unwritable | No logs generated | Set correct permissions (chmod -R 775). |
| Unsupported Mink driver | Screenshots fail (if enabled) | Disable screenshot or switch driver. |
| CI storage limits exceeded | Artifact uploads fail | Clean logs post-run or increase quota. |
| Behat configuration error | Extension ignored | Validate behat.yml syntax. |
| Sensitive data in logs | Security risk | Sanitize URLs/inputs before testing. |
session.html for DOM state").How can I help you explore Laravel packages today?