laravel-dusk

Automate browser-based end-to-end testing for Laravel applications with Dusk.

Updated Oct 26, 2025
One-click install
npx skills add https://github.com/Hieubkav/wincellarCloneBackend --skill laravel-dusk-hieubkav
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-dusk
Source: https://github.com/Hieubkav/wincellarCloneBackend/tree/main/.claude/skills/laravel/laravel-dusk
Command: npx skills add https://github.com/Hieubkav/wincellarCloneBackend --skill laravel-dusk-hieubkav

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides patterns and references for Laravel Dusk-based browser automation, UI testing, and end-to-end testing workflows to ensure robust front-end flows and Reactivity in Laravel applications.

Core Features & Use Cases

  • Browser-based end-to-end tests for authentication flows, forms, and UI interactions
  • Page objects, selectors, and synchronization strategies
  • Test organization, parallelization, and CI integration guidance
  • Debugging tips for flaky UI tests and browser drivers

Quick Start

Set up Laravel Dusk, create basic browser tests, and run them in CI to validate UI behavior.

Frequently Asked Questions about laravel-dusk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up browser testing for Laravel applications?

Browser testing for Laravel apps uses Laravel Dusk, which automates UI interactions through ChromeDriver or alternatives. Install Dusk via Composer, configure your test environment, and write tests that simulate user actions like form submissions and navigation to validate front-end behavior.

What's the best way to organize end-to-end tests in Laravel?

Use the Page Object pattern to organize Dusk tests: create page classes that encapsulate selectors and interactions, then reference them in test files. This approach reduces duplication, improves maintainability, and makes tests readable when testing authentication flows, forms, and UI interactions.

Can I test Vue.js components with Laravel Dusk?

Yes, Laravel Dusk supports Vue.js component testing within Laravel applications. Use Dusk selectors to target component elements, apply explicit waiting strategies to handle asynchronous updates, and leverage browser macros for reusable interaction patterns across reactive components.

How do I handle flaky browser tests and synchronization issues?

Browser test flakiness stems from timing issues. Use Dusk's explicit waiting strategies instead of fixed delays, configure appropriate timeout values for ChromeDriver, and apply the Page Object pattern to centralize selectors. Debug by inspecting DOM state and driver logs to identify race conditions.

How do I run Dusk tests in CI pipelines?

Integrate Laravel Dusk into CI by installing ChromeDriver or a compatible browser driver, configuring environment variables for test database and app URL, and running Dusk tests in parallel to reduce execution time. Most CI services support headless browser execution for automated validation.

What are the limitations of browser-based testing with Dusk?

Dusk tests are slower than unit tests, require a running application instance, and depend on browser driver stability. They're best used for critical user flows—authentication, checkout, forms—rather than exhaustive coverage. Consider combining Dusk with unit and integration tests for comprehensive validation.