Laravel Dusk Testing

Laravel Dusk Testing is a skill for Claude Code, Codex from PramodDutta/qaskills. It costs 44 tokens per session (3,723 once invoked), scanned A, original, MIT.

A guide to testing Laravel and PHP applications in a real Chrome browser with Laravel Dusk. It covers browser actions, checks, reusable page objects, login helpers, and test database setup.

In plain words
What is it for?
Use it to write, review, or debug Laravel Dusk end-to-end tests, including page objects, component checks, authentication flows, and database-backed scenarios.
Why use it?
It helps catch problems in complete user journeys, such as logging in or submitting a form, that smaller code tests may miss. It also keeps browser tests organized and isolated from one another.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for aider. Also seen: mentions Codex; built for aider.

Good fit Use it to write, review, or debug Laravel Dusk end-to-end tests, including page objects, component checks, authentication flows, and database-backed scenarios.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pramoddutta/qaskills/laravel-dusk-testing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PramodDutta/qaskills --skill laravel-dusk-testing
Clone the repo
git clone --depth 1 https://github.com/PramodDutta/qaskills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Laravel Dusk Testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/pramoddutta/qaskills/laravel-dusk-testing/github.svg)](https://agentmods.dev/skills/pramoddutta/qaskills/laravel-dusk-testing)
Your own site
<a href="https://agentmods.dev/skills/pramoddutta/qaskills/laravel-dusk-testing"><img src="https://agentmods.dev/badge/skills/pramoddutta/qaskills/laravel-dusk-testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Laravel Dusk Testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/pramoddutta/qaskills/laravel-dusk-testing"><img src="https://agentmods.dev/badge/skills/pramoddutta/qaskills/laravel-dusk-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,723 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 458
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.03723
Opus 5 $0.00022 $0.01861
Sonnet 5 $0.00009 $0.00745
Haiku 4.5 $0.00004 $0.00372

Measured 7d ago against content hash 5c839c9cdeb1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

Laravel Dusk Testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

seed-skills/laravel-dusk-testing/SKILL.md · 528 lines

How it starts

The opening of the file, as written. The whole thing — 528 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Laravel Dusk Testing Skill

You are an expert QA automation engineer specializing in Laravel Dusk browser testing for PHP/Laravel applications. When the user asks you to write, review, or debug Dusk tests, follow these detailed instructions.

Core Principles

  1. Laravel-native testing -- Dusk integrates deeply with Laravel. Use loginAs(), database factories, and artisan commands within tests for realistic setups.
  2. Chrome-powered reliability -- Dusk uses ChromeDriver directly, not WebDriver protocol layers. This gives fast, stable browser automation with automatic ChromeDriver management.
  3. Fluent browser API -- Chain browser methods: $browser->visit()->type()->press()->assertSee(). Each method returns the browser instance for readable flows.
  4. Page Objects for encapsulation -- Use Dusk Page classes with $elements shortcuts and assert() methods to encapsulate page-specific logic.
  5. Test isolation -- Each test gets a fresh browser session. Use DatabaseMigrations or RefreshDatabase traits for clean database state.

Project Structure

Always organize Laravel Dusk projects with this structure:

tests/
  Browser/
    LoginTest.php
    DashboardTest.php
    CheckoutTest.php
    Components/
      DatePickerComponent.php
      ModalComponent.php
    Pages/
      LoginPage.php
      DashboardPage.php
      BasePage.php
  DuskTestCase.php
  .env.dusk.local
  .env.dusk.testing

Setup

Installation

composer require --dev laravel/dusk
php artisan dusk:install

This creates tests/Browser/, tests/DuskTestCase.php, and downloads ChromeDriver.

Environment (.env.dusk.local)

APP_URL=http://localhost:8000
DB_DATABASE=testing
DB_USERNAME=root
DB_PASSWORD=
SESSION_DRIVER=file

DuskTestCase Configuration

<?php

namespace Tests;

use Facebook\WebDriver\Chrome\ChromeOptions;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Laravel\Dusk\TestCase as BaseTestCase;

abstract class DuskTestCase extends BaseTestCase
{
    protected function driver(): RemoteWebDriver
    {
        $options = (new ChromeOptions)->addArguments([
            '--disable-gpu',
            '--headless=new',
            '--no-sandbox',
            '--window-size=1920,1080',
        ]);

        return RemoteWebDriver::create(
            'http://localhost:9515',
            DesiredCapabilities::chrome()->setCapability(
                ChromeOptions::CAPABILITY, $options
            )
        );
    }
}

Read the full file on GitHub · 528 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 528 lines · 44 tokens per session scan A 5c839c9cdeb1

Subscribe to this mod's changes

Laravel Dusk Testing is a skill published in the GitHub repository PramodDutta/qaskills (220 stars, last pushed 11d ago), licensed MIT. It adds 44 tokens to every session and 3,723 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

api-testing

API testing patterns for Playwright -- apiRequest fixture usage, Zod response schema creation and validation, test.step wrapping for multi-call tests, per-field negative/validation testing, path parameter fuzzing, and helper fixtures for shared setup/teardown. Use when writing or updating API test specs, adding tests…

idavidov13/agentic-playwright · 132 tokens

debugging

Playwright test debugging conventions for the scaffold — reading failure messages, classifying failure modes (TimeoutError, ZodError, strict-mode violation, locator not found, network errors, schema drift), the playwright.config.ts capture defaults (trace on-first-retry, screenshot only-on-failure, video…

idavidov13/agentic-playwright · 179 tokens

test-standards

Spec file conventions for the Playwright scaffold — imports from test-options.ts, test file structure (describe / beforeEach / test / test.step), single-tag rule, functional vs E2E vs API vs setup test types, data-driven test loops against TS static data, web-first assertions, destructive-test cleanup, and test…

idavidov13/agentic-playwright · 166 tokens

data-strategy

Test data strategy for the Playwright scaffold — Faker + Zod factories for dynamic happy-path data, static TS files (.ts with as const exports — never .json) for domain-specific curated invalid sets, and the universal type-mismatch arrays in test-data/static/util/invalid-values.ts. Use when creating or editing a data…

idavidov13/agentic-playwright · 160 tokens

helpers

Plain utility function conventions for the Playwright scaffold — app-specific helpers in helpers/{area}/ (authentication bootstrap, storage-state creation, data seeding) and generic utilities in helpers/util/ (date formatting, string manipulation, parsing). Use when adding a reusable function that does NOT need the…

idavidov13/agentic-playwright · 152 tokens

page-objects

Page Object Model pattern for the Playwright scaffold — class structure, get-accessor locator pattern, action-method conventions, component composition, registration via the page-object fixture, and the mandatory exploration-first workflow. Use when creating a new page object, adding or updating locators on an…

idavidov13/agentic-playwright · 129 tokens