laravel-testing

Create Pest tests for Laravel features, units, and integrations.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of writing and maintaining comprehensive tests for Laravel applications, ensuring code quality and reliability.

Core Features & Use Cases

  • Pest Test Generation: Write feature, unit, and integration tests using the Pest testing framework.
  • Factory Management: Efficiently create and manage test data using model factories.
  • Use Case: When developing a new feature in a Laravel app, use this Skill to generate tests that cover all user interactions, data validations, and authorization checks.

Quick Start

Use the laravel-testing skill to write a feature test for the user registration endpoint.

Frequently Asked Questions about laravel-testing

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

FAQPage Schema
How do I write Pest tests for a Laravel feature like user registration?

Laravel model factories provide efficient test data creation and management for your Pest tests. By combining factories with database seeding, you can generate predictable data sets to validate application logic and HTTP responses reliably.

Does this Laravel testing approach use the RefreshDatabase trait?

Yes, this Laravel testing approach adheres to strict testing conventions by using the RefreshDatabase trait. This trait resets your database state after each test, ensuring isolated and reliable feature and integration test execution.

What's the best way to manage test data when testing Laravel applications?

The best way to manage test data in Laravel applications is using model factories with explicit factory attribute definitions. This allows you to generate and control test data efficiently for both unit and feature tests without manual database insertion.

Can I use Pest for both unit and feature tests in Laravel?

Yes, you can use the Pest testing framework to generate both unit and feature tests in Laravel. It supports asserting HTTP responses and application logic across various testing scenarios, including integration testing.

How do I assert HTTP responses in Laravel feature tests using Pest?

You assert HTTP responses in Laravel feature tests by generating tests that validate application logic and endpoint interactions. Using Pest, you can explicitly check user interactions, data validations, and authorization checks for routes like user registration.