lc:generate-test

Generate PHPUnit or Pest test files for Laravel models, controllers, actions, and Livewire components.

12|2|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/edulazaro/laraclaude --skill lc-generate-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lc:generate-test
Source: https://github.com/edulazaro/laraclaude/tree/main/skills/generate-test
Command: npx skills add https://github.com/edulazaro/laraclaude --skill lc-generate-test

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill eliminates the manual overhead of writing boilerplate test code, ensuring your Laravel application remains stable and bug-free through comprehensive automated coverage.

Core Features & Use Cases

  • Context-Aware Generation: Automatically detects your testing framework (Pest or PHPUnit) and matches existing project coding styles.
  • Deep Analysis: Scans models, controllers, actions, and Livewire components to generate tests for relationships, validation rules, authorization, and side effects.
  • Use Case: When you create a new Eloquent model or complex Action, use this skill to instantly generate a full suite of feature or unit tests covering happy paths, edge cases, and validation logic.

Quick Start

Use the lc:generate-test skill to create a comprehensive test suite for the User model.

Frequently Asked Questions about lc:generate-test

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

FAQPage Schema
How do I automatically generate Laravel tests for models and controllers?

You can automatically generate Laravel tests by analyzing source code structure and dependencies to create PHPUnit or Pest test files. This process targets models, controllers, actions, and Livewire components to ensure full coverage of business logic and framework interactions.

Does Laravel test generation work with both Pest and PHPUnit?

Yes, Laravel test generation works with both Pest and PHPUnit. The process is context-aware, automatically detecting your project's testing framework and matching existing project coding styles to validate the generated code correctly.

What is the best way to create feature tests for Livewire components and actions?

The best way to create feature tests for Livewire components and actions is through deep code analysis. This approach scans your source files to generate tests covering relationships, validation rules, authorization, side effects, happy paths, and edge cases.

How to generate validation and authorization tests for Eloquent models?

To generate validation and authorization tests for Eloquent models, use automated test generation that scans model structures and dependencies. This creates a full suite of unit tests covering business logic, validation rules, and framework interactions.

Can I generate edge case tests for Laravel actions without writing boilerplate?

Yes, you can generate edge case tests without writing boilerplate by using automated code generation. This eliminates manual overhead by instantly creating comprehensive test suites that cover happy paths, edge cases, and validation logic for your Laravel actions.

What components are supported when generating Pest tests for Laravel applications?

When generating Pest tests for Laravel applications, supported components include models, controllers, actions, and Livewire components. The generated tests are validated against project-specific testing patterns and database requirements.