pest-testing

Write and run Pest 4 unit, feature, and browser tests in PHP projects.

12|1|Updated Jan 7, 2026
One-click install
npx skills add https://github.com/spatie/wordstockt.com --skill pest-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pest-testing
Source: https://github.com/spatie/wordstockt.com/tree/main/.claude/skills/pest-testing
Command: npx skills add https://github.com/spatie/wordstockt.com --skill pest-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill streamlines the process of writing and running Pest 4 tests in PHP projects, reducing boilerplate and speeding up feedback on code changes.

Core Features & Use Cases

  • Unified Testing: Write unit, feature, and browser tests using Pest 4 syntax.
  • Guided Best Practices: Structured test organization, datasets, and assertions to improve reliability.
  • Real-world Scenarios: Use with Laravel apps to validate API endpoints, database interactions, and UI components.

Quick Start

Create tests with php artisan make:test --pest {name}, organize them under tests/Unit, tests/Feature, or tests/Browser, and run tests with php artisan test.

Frequently Asked Questions about pest-testing

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

FAQPage Schema
How do I write and run Pest tests for a Laravel application?

To run Pest tests, generate files using php artisan make:test --pest, organize them under tests/Unit, tests/Feature, or tests/Browser, and execute the suite with php artisan test.

Can I use Pest for unit, feature, and browser testing in PHP?

Yes, Pest supports unified testing for unit, feature, and browser scenarios within PHP applications, allowing you to validate API endpoints, database interactions, and UI components using a single syntax.

Do I need Composer and PHP installed to run Pest tests?

Yes, you need PHP and Composer installed in your project to require the Pest package, define tests, and execute them successfully within your application environment.

What is the best way to organize Pest test files in a PHP project?

The recommended approach for organizing Pest tests is structuring them into dedicated directories like tests/Unit, tests/Feature, and tests/Browser to improve reliability and maintain clear test boundaries.

Does Pest testing support datasets and structured assertions?

Yes, Pest testing provides guided best practices for structuring test organization, utilizing datasets, and applying assertions to improve the reliability of your PHP application tests.