pest-testing

Automate PHP application testing with Pest 4 for unit, feature, and browser tests.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/coollabsio/laravel-template --skill pest-testing-coollabsio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pest-testing
Source: https://github.com/coollabsio/laravel-template/tree/main/.cursor/skills/pest-testing
Command: npx skills add https://github.com/coollabsio/laravel-template --skill pest-testing-coollabsio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pest-based testing for PHP applications using Pest 4 to simplify and accelerate writing unit, feature, and browser tests, including Livewire, with streamlined assertions and mocking.

Core Features & Use Cases

  • Pest-based testing workflow: Write concise tests with Pest syntax and organize under tests/Unit, tests/Feature, and tests/Browser.
  • Livewire and browser testing support: Validate UI components and end-to-end interactions across browsers.
  • Debugging and data-driven tests: Use datasets and assertions to verify functionality and handle mock scenarios in CI.

Quick Start

Create a Pest-based test suite by running php artisan make:test --pest {name} and organize tests under tests/Unit, tests/Feature, and tests/Browser.

Frequently Asked Questions about pest-testing

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

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

You can write Pest tests for Laravel by running php artisan make:test --pest to generate files, then organizing your test suites under the tests/Unit, tests/Feature, and tests/Browser directories for streamlined assertions.

Can I use Pest 4 to test Livewire components and run browser tests?

Yes, Pest 4 supports testing Livewire components and running browser tests, allowing you to validate UI components and execute end-to-end interactions across browsers within your PHP application workflow.

What's the best way to structure data-driven tests and handle mocking in PHP?

The best way to structure data-driven tests in PHP is using Pest 4 datasets with assertions to verify functionality, while leveraging its mocking workflows to handle mock scenarios efficiently during CI runs.

Do I need specific PHP testing helpers to run Pest 4 unit and feature tests?

Yes, running Pest 4 requires PHP, the Pest 4 framework, and Laravel testing helpers to properly execute and organize your unit, feature, and browser tests under the standard tests directory structure.

How does Pest 4 simplify debugging failures for PHP unit tests?

Pest 4 simplifies debugging failures for PHP unit tests by providing concise syntax and streamlined assertions, making it faster to identify issues within your data-driven or mocking workflows.

When should I organize PHP tests into tests/Unit versus tests/Feature directories?

You should organize PHP tests by placing isolated logic checks into tests/Unit and broader application interactions into tests/Feature, using php artisan make:test --pest to automatically generate the appropriate Pest test files.