nunomaduro/laravel-console-dusk
Run Laravel Dusk browser automation inside Artisan commands for Laravel or Laravel Zero. Configure screenshots/log paths, headless mode, and driver options to script and test real browser flows from the console.
This package adds browser testing capabilities directly to Laravel's Artisan console, leveraging Laravel Dusk under the hood. With v1.15.0, it now explicitly supports Laravel 13. Start by installing via Composer: composer require --dev nunomaduro/laravel-console-dusk. After installation, publish the config (php artisan vendor:publish --provider="NunoMaduro\LaravelConsoleDusk\LaravelConsoleDuskServiceProvider"), and you’re ready to run Dusk tests (e.g., php artisan dusk:test Tests/Browser/LoginTest.php) directly from the console—no separate php artisan dusk server needed.
Developers commonly use this package to:
php artisan serve) for faster feedback loops.php artisan dusk:test --watch.Ensure your phpunit.xml includes the Dusk configuration and that your test cases extend NunoMaduro\LaravelConsoleDusk\DuskTestCase.
php artisan dusk entirely; advanced workflows (e.g., parallel tests, custom server configs) may still require the standard Dusk commands.APP_URL in .env.dusk.local is correctly set (often http://localhost:8000).DuskTestCase methods (e.g., setUpBeforeClass) as usual—the console integration is non-intrusive.How can I help you explore Laravel packages today?