laravel-tdd

Set up Pest 4 unit and feature testing for Laravel 13 applications.

8|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/elmochilyas/laraskills --skill laravel-tdd-elmochilyas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-tdd
Source: https://github.com/elmochilyas/laraskills/tree/main/skills/laravel-tdd
Command: npx skills add https://github.com/elmochilyas/laraskills --skill laravel-tdd-elmochilyas

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pestphp/pest, pestphp/pest-plugin-laravel, pestphp/pest-plugin-browser, playwright, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Streamline testing in Laravel 13 applications by providing a comprehensive framework for unit and feature testing with Pest 4.

Core Features & Use Cases

  • Pest 4 Integration: Ships with Pest 4, Laravel's test framework, for smooth testing experiences.
  • Test Setup: Provides detailed instructions for setting up and configuring Pest 4 with Laravel.
  • Test File Naming and Organization: Offers best practices for organizing test files.
  • Basic Test Structure: Serves as a guide for writing tests with examples.
  • Authentication Tests: Includes tests for handling authentication scenarios.
  • Model Factories: Utilizes factories for creating test data.
  • HTTP Tests: Demonstrates how to write tests for HTTP requests.
  • Database Testing: Covers techniques for testing database interactions.
  • Browser Tests (Pest): Includes integration with Playwright for browser testing.

Quick Start

Run the laraskills init command in your Laravel project to integrate Laravel 13 TDD support.

Frequently Asked Questions about laravel-tdd

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

FAQPage Schema
How do I set up Pest 4 for Laravel 13 testing?

Laravel 13 TDD with Pest 4 provides automated setup by running the laraskills init command, which configures your testing environment and integrates Pest 4 for unit, feature, authentication, and database testing scenarios.

What's the best way to organize Laravel test files when using Pest?

Organizing Laravel test files with Pest involves following provided best practices for file naming and structure, ensuring unit, feature, HTTP, and browser tests are cleanly separated for maintainable test suites.

Can I use model factories for creating test data in Pest 4?

Yes, you can use Laravel model factories to generate test data in Pest 4. The framework integrates factory usage directly within its provided database and model testing scenarios.

Does Laravel 13 TDD support browser testing with Playwright?

Yes, Laravel 13 TDD supports browser testing by integrating Pest with Playwright, allowing you to execute automated browser tests alongside standard HTTP and database feature tests.

How do I test authentication scenarios in Laravel with Pest?

Testing authentication scenarios in Laravel with Pest involves using the included authentication test structures, which guide you through verifying user login states and protected route access securely.