Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Console Dusk Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Getting Started

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.

Implementation Patterns

Developers commonly use this package to:

  • Run individual Dusk tests in isolation during local development without starting the Dusk server manually.
  • Integrate into local workflow (e.g., after php artisan serve) for faster feedback loops.
  • Use in continuous integration pipelines where full Dusk server setup is undesirable (though headless mode is still required).
  • Enable auto-reload or re-run on file changes via helpers like php artisan dusk:test --watch.

Ensure your phpunit.xml includes the Dusk configuration and that your test cases extend NunoMaduro\LaravelConsoleDusk\DuskTestCase.

Gotchas and Tips

  • Despite Laravel 13 support, verify your app’s Dusk dependencies (e.g., ChromeDriver compatibility) match the updated tooling.
  • The package does not replace php artisan dusk entirely; advanced workflows (e.g., parallel tests, custom server configs) may still require the standard Dusk commands.
  • The console wrapper adds overhead in large test suites; prefer direct Dusk for large-scale parallel CI runs.
  • If tests hang or fail to connect, ensure APP_URL in .env.dusk.local is correctly set (often http://localhost:8000).
  • To extend behavior, override DuskTestCase methods (e.g., setUpBeforeClass) as usual—the console integration is non-intrusive.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport