- How do I install MinkDebugExtension for Behat in a Laravel project?
- Run `composer require friends-of-behat/mink-debug-extension` and add the extension to your `behat.yml` under the `extensions` key with a required `directory` path. No Laravel-specific setup is needed since it’s a Behat-only package.
- Does this work with Laravel’s native testing tools like Pest or PHPUnit?
- No, this extension is designed for Behat/Mink only. If you’re using Laravel’s built-in testing tools (Pest/PHPUnit), consider alternatives like Pest plugins or Laravel Dusk for debugging.
- Which Mink drivers support screenshots with this extension?
- Screenshots are only saved if your Mink driver supports them (e.g., Selenium2 or custom drivers with screenshot capabilities). Goutte, which is HTTP-based, does not support screenshots.
- Can I configure the log directory to use Laravel’s storage path?
- Yes, use `%paths.base%` in your `behat.yml` to reference the directory where your `behat.yml` is located, or specify a full path like `storage/logs/behat-debug`.
- Will this slow down my CI runs significantly?
- The extension adds minimal overhead for logging, but screenshots and debug output may increase CI artifact size. Disable `screenshot` or restrict usage to local development if performance is critical.
- Is this package compatible with Laravel 10 and PHP 8.1+?
- The package itself has no Laravel dependencies, but Mink drivers (e.g., Selenium2) may require PHP 7.4+. Test compatibility by running `composer require` and checking for version conflicts.
- How do I clean up old debug logs automatically?
- Set `clean_start: true` in your `behat.yml` configuration to wipe the log directory before each Behat run. This prevents clutter from accumulating across test suites.
- What alternatives exist for debugging Mink tests in Laravel?
- Consider Laravel Dusk (built-in Selenium wrapper) for UI testing, or custom Behat hooks using Symfony Profiler. If you’re not using Behat, Pest plugins or PHPUnit’s `--verbose` may suffice.
- Does this extension work with Dockerized Selenium for CI?
- Yes, but ensure your Selenium container supports screenshot capture. Configure the Mink driver to point to your Dockerized Selenium instance, then enable `screenshot: true` in the extension settings.
- Is this package actively maintained? Should I fork it if issues arise?
- The package is abandoned (last release 2021), so long-term support is unclear. If critical, fork it or replace it with a custom Behat hook using Symfony’s Debug component for similar functionality.