pest-testing
This skill guides you through testing Laravel applications with Pest 4, covering unit and feature tests, browser testing with real browsers, and architecture validation. It handles test organization, assertions, mocking, datasets, and debugging—activating whenever you're writing tests, adding assertions, or verifying functionality.
Pest Testing helps you write and organize Pest 4 tests for Laravel applications with comprehensive testing patterns.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-22
Pest Testing helps you write and organize Pest 4 tests for Laravel applications with comprehensive testing patterns. This skill guides you through testing Laravel applications with Pest 4, covering unit and feature tests, browser testing with real browsers, and architecture validation. It handles test organization, assertions, mocking, datasets, and debugging—activating whenever you're writing tests, adding assertions, or verifying functionality.
Use it when
- pest-testing includes browser testing with real browsers, letting you interact with your application like a user would.
- pest-testing provides guidance on debugging failing tests and verifying application functionality.
Verify before relying
Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.
Install
spatie/freek.dev/pest-testing · repository language: PHP
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How to write pest tests in Laravel?
pest-testing guides you through creating unit and feature tests for Laravel applications. Start by organizing tests in your test suite, then write test functions using Pest's fluent syntax. pest-testing covers test structure, assertions, and best practices for validating your Laravel application's functionality across units, features, and browser interactions.
What does pest-testing cover for browser testing?
pest-testing includes browser testing with real browsers, letting you interact with your application like a user would. It covers navigating pages, filling forms, clicking buttons, and verifying responses. pest-testing also addresses smoke testing across multiple pages and browser test interactions to ensure your application works end-to-end.
How can pest-testing help debug failing tests?
pest-testing provides guidance on debugging failing tests and verifying application functionality. It helps you identify why assertions fail, understand test output, and trace issues back to your code. pest-testing supports this core intent so you can quickly resolve test failures and maintain confidence in your test suite.
What testing techniques does pest-testing include?
pest-testing covers datasets for parameterized testing, mocking to isolate components, and comprehensive assertions for validation. It also includes architecture tests to verify code structure, visual regression testing to catch UI changes, and test organization strategies. pest-testing supports unit tests, feature tests, and Livewire component testing.
How does pest-testing support test organization?
pest-testing guides test organization structure so your suite stays maintainable as it grows. It covers organizing tests by feature or concern, using datasets and mocking effectively, and running tests in parallel with sharding for CI environments. pest-testing helps you follow best practices for a scalable, well-organized test suite.
Can pest-testing help with test coverage verification?
pest-testing addresses test coverage verification and helps you measure how thoroughly your tests validate your application. Combined with assertions, datasets, and debugging support, pest-testing ensures you're testing the right scenarios and catching regressions before they reach production.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Pest Testing 4
When to Apply
Activate this skill when:
- Creating new tests (unit, feature, or browser)
- Modifying existing tests
- Debugging test failures
- Working with browser testing or smoke testing
- Writing architecture tests or visual regression tests
Documentation
Use search-docs for detailed Pest 4 patterns and documentation.
Basic Usage
Creating Tests
All tests must be written using Pest. Use php artisan make:test --pest {name}.
Test Organization
- Unit/Feature tests:
tests/Featureandtests/Unitdirectories. - Browser tests:
tests/Browser/directory. - Do NOT remove tests without approval - these are core application code.
Basic Test Structure
<code-snippet name="Basic Pest Test Example" lang="php">
it('is true', function () {
(truncated - see the full file via the links below)
File tree — 1 file
.claude/skills/pest-testing/SKILL.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Write and organize Pest tests for Laravel applications”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
This skill teaches you to write and run Pest 3 tests across Bagisto's modular package structure. Learn to create unit and feature tests, use assertions and mocking, organize tests by package, and run specific test suites via command line.
This skill guides you through building reactive Livewire 4 components using wire directives like wire:model, wire:click, and wire:loading. It covers component creation in single-file, multi-file, and class-based formats, plus Livewire 4's new features including islands, async actions, and deferred loading. Learn best practices for testing, validation, and debugging interactive components.
Testing generates comprehensive Pest test suites for FilamentPHP v4 components including resources, forms, tables, and authorization. It provides ready-to-use test patterns for list, create, edit, and view pages with built-in validation and bulk action testing.
This skill guides you through TDD methodology tailored for Laravel development, using Pest PHP and Laravel's testing tools. Learn the red-green-refactor cycle with Laravel-specific patterns for controllers, models, authorization, APIs, and database operations. Apply TDD consistently across features and bugfixes to build reliable Laravel applications.
This skill guides you through testing Laravel 13 applications with either Pest PHP 4 or PHPUnit 12, covering 24 rules across HTTP endpoints, model factories, database state verification, service mocking, and authentication patterns. It detects your project's testing framework automatically and provides syntax examples for both frameworks side-by-side, so you can write fast, readable tests regardless of which one you use.
Laravel Dusk is a powerful testing framework that automates browser interactions for Laravel applications. This skill covers installation, configuration, and practical techniques for writing reliable end-to-end tests without complex setup. Gain hands-on experience with browser automation to validate your application's user workflows.
More skills pest (MIT) · laravel-dusk-skill (MIT)