laravel-dusk-skill
This skill streamlines end-to-end testing by automating the generation of Laravel Dusk browser test scripts. It enables developers to quickly scaffold and compose test cases for web application workflows, reducing manual test writing overhead and accelerating QA automation cycles.
Laravel Dusk is an end-to-end testing framework that automates browser interactions to validate web application workflows. The laravel-dusk-skill streamlines this process by helping developers quickly generate and write Dusk browser tests that simulate real user actions like clicking, typing, and form submission. Dusk uses ChromeDriver to control a headless Chrome browser, allowing you to test your Laravel application's UI and user flows without manual intervention.
AI-generated summary based on this skill's SKILL.md
Install
LambdaTest/agent-skills/laravel-dusk-skill · repository language: Python
git clone https://github.com/LambdaTest/agent-skills
cp -r agent-skills/laravel-dusk-skill ~/.claude/skills/laravel-dusk-skillFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
What is Laravel Dusk browser testing and how does it work?
Laravel Dusk is an end-to-end testing framework that automates browser interactions to validate web application workflows. The laravel-dusk-skill streamlines this process by helping developers quickly generate and write Dusk browser tests that simulate real user actions like clicking, typing, and form submission. Dusk uses ChromeDriver to control a headless Chrome browser, allowing you to test your Laravel application's UI and user flows without manual intervention.
How do I write Dusk tests in Laravel using the browser API?
The laravel-dusk-skill guides you through writing Dusk tests by teaching the core syntax and API methods for browser interactions. Tests typically extend DuskTestCase and use methods like $browser->visit() to navigate to pages, $browser->type() to fill forms, $browser->click() to trigger actions, and $browser->assertSee() to verify outcomes. The skill provides examples and best practices for structuring test cases that cover user workflows such as login, form submission, and multi-step processes.
What are the key steps for Laravel Dusk installation and setup?
Setting up Laravel Dusk involves installing the package via Composer, publishing configuration files, and configuring your testing environment. The laravel-dusk-skill covers the DuskTestCase setup tutorial, including database seeding, environment variables, and ChromeDriver configuration. Proper setup ensures your testing environment is isolated, your database is reset between tests, and your browser driver is correctly pointed to your application's base URL.
How do I test login flows with Dusk in Laravel applications?
The laravel-dusk-skill addresses testing user workflows like login by demonstrating how to use Dusk assertions and browser methods to validate authentication flows. You can write tests that visit the login page, type credentials, submit the form, and assert that the user is redirected to the dashboard or that specific elements appear after successful login. This approach ensures your authentication system works end-to-end before deployment.
Can Laravel Dusk be integrated with cloud testing platforms like LambdaTest?
Yes, the laravel-dusk-skill includes guidance on integrating Laravel Dusk with cloud testing platforms such as LambdaTest. This integration allows you to run your Dusk tests across multiple browsers and devices in the cloud rather than locally, improving test coverage and CI/CD pipeline efficiency. The skill covers configuration steps and best practices for connecting your Dusk tests to cloud providers.
What are the main benefits of using Laravel Dusk for automated browser testing?
The laravel-dusk-skill emphasizes that Dusk reduces manual test writing overhead and accelerates QA automation cycles by enabling developers to quickly scaffold and compose test cases for web application workflows. Automated browser tests catch regressions early, provide confidence in UI changes, and allow teams to focus on feature development rather than repetitive manual testing. Dusk's tight integration with Laravel makes it ideal for testing Laravel applications end-to-end.
SKILL.md
rendered from the published skill — quoted content, verbatim
Laravel Dusk Skill
For TestMu AI cloud execution, see reference/cloud-integration.md and shared/testmu-cloud-reference.md.
Core Patterns
Basic Test
```php <?php namespace Tests\Browser;
use Laravel\Dusk\Browser; use Tests\DuskTestCase;
class LoginTest extends DuskTestCase { public function testLoginWithValidCredentials(): void { $this->browse(function (Browser $browser) { $browser->visit('/login') ->type('email', 'user@test.com') ->type('password', 'password123') ->press('Login') ->assertPathIs('/dashboard') ->assertSee('Welcome'); }); }
public function
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 4 files
laravel-dusk-skill/SKILL.md
laravel-dusk-skill/reference/advanced-patterns.md
laravel-dusk-skill/reference/cloud-integration.md
laravel-dusk-skill/reference/playbook.md