Claude
Skills
Sign in
Back

test-plan

Included with Lifetime
$97 forever

Create comprehensive E2E test plans with deep application analysis, navigation coverage audit, and browser-testable scenarios

Security

What this skill does


# E2E Test Plan Skill

## Overview

This skill creates exhaustive, browser-testable E2E test plans by deeply analyzing Laravel Filament applications. It documents all pages, user roles, critical flows, navigation coverage, and detailed test scenarios that can be executed step-by-step by a QA tester who has never seen the codebase.

## Standard Plan Location

**Default output**: `docs/detailed-test-list.md`

This skill ALWAYS saves the test plan to `docs/detailed-test-list.md` unless a custom path is specified via the `--output` flag.

**Important**:
- Create the `docs/` directory if it doesn't exist
- Use the Write tool to save the plan to the standard location
- In update mode: Merge new discoveries with existing plan content
- Use `--force` flag to completely overwrite existing plan
- Use `--quick` flag for basic plan without deep discovery

## Purpose

Generate structured test plans that ensure:
- All pages are identified and will be tested
- All user roles are mapped with their permissions
- Critical user flows are documented
- Test scenarios cover positive and negative cases
- **100% NAVIGATION COVERAGE**: Every menu item and internal link is tested
- Cross-user interactions are documented
- Every test can be executed by someone who never saw the codebase
- Priority levels guide test execution order

## Review and Update Mode

When `docs/detailed-test-list.md` exists (and no `--force` flag), operate in **review and update mode**:

### Step 0a: Read Existing Plan

1. **Parse Existing Plan Content**
   - Read `docs/detailed-test-list.md`
   - Extract existing pages from navigation registry
   - Extract existing roles from test user accounts
   - Extract existing flows from test sections
   - Extract test credentials
   - Note the previous "Generated" date

### Step 0b: Validate Existing Content

1. **Validate Pages**
   For each page in the existing plan:
   - Check if the route still exists in the codebase
   - For Laravel: Check routes/web.php, Filament resources
   - Mark pages as "deprecated" if route no longer exists

2. **Validate Roles**
   - Check if role definitions still exist
   - Check permission assignments
   - Mark roles that no longer exist

3. **Validate Flows**
   - Check if flow entry points still exist
   - Verify flow steps are still valid

### Step 0c: Discover New Content

Compare current codebase against documented content:
- Find new routes not in existing plan
- Find new Filament resources
- Find new roles/permissions
- Find new navigation items

### Step 0d: Merge and Update

- Keep valid existing content
- Add newly discovered content
- Mark deprecated items
- Generate update report showing changes

## Workflow

### Phase 1: Deep Discovery (Execute All Commands)

You MUST execute these discovery commands to understand the complete application:

#### 1.1 Database Architecture Analysis

```bash
ls -la database/migrations/
cat database/migrations/*.php
```

For each table, document:
- Table name and purpose
- Key columns and types
- Foreign key relationships
- Pivot tables

#### 1.2 Model & Relationship Mapping

```bash
ls -la app/Models/
cat app/Models/*.php
```

For each model, extract:
- Relationships (hasMany, belongsTo, belongsToMany, morphTo)
- Scopes (local and global)
- Casts and attributes
- Traits used (HasRoles, SoftDeletes)

#### 1.3 Authentication & Authorization System

```bash
cat config/auth.php
cat config/permission.php 2>/dev/null
ls -la app/Policies/ 2>/dev/null
cat app/Policies/*.php 2>/dev/null
cat app/Providers/AuthServiceProvider.php 2>/dev/null
ls -la app/Http/Middleware/
cat database/seeders/*.php
grep -A 50 "Role\|Permission" database/seeders/*.php 2>/dev/null
```

Document:
- All roles in the system
- All permissions per role
- Policy rules per resource
- Guard configurations

#### 1.4 Filament Panel Configuration

```bash
cat app/Providers/Filament/*.php 2>/dev/null
ls -la app/Filament/
find app -name "*PanelProvider*" -exec cat {} \; 2>/dev/null
```

Document:
- Number of panels
- Panel URLs and access rules
- Navigation structure
- Multi-tenant configuration

#### 1.5 Filament Resources Deep Dive

```bash
find app/Filament -name "*Resource.php" | head -50
find app/Filament -name "*Resource.php" -exec cat {} \;
```

For each resource, extract:
- Associated model
- Form fields and validation rules
- Table columns and filters
- Actions (table, bulk, header)
- Relation managers
- Authorization methods

#### 1.6 Filament Pages & Widgets

```bash
find app/Filament -name "*Page*.php" -exec cat {} \; 2>/dev/null
find app/Filament -name "*Widget*.php" -exec cat {} \; 2>/dev/null
ls -la app/Livewire/ 2>/dev/null
```

#### 1.7 Business Logic Layer

```bash
ls -la app/Actions/ 2>/dev/null
cat app/Actions/**/*.php 2>/dev/null
ls -la app/Services/ 2>/dev/null
ls -la app/Jobs/ 2>/dev/null
cat app/Jobs/*.php 2>/dev/null
ls -la app/Notifications/ 2>/dev/null
cat app/Notifications/*.php 2>/dev/null
ls -la app/Mail/ 2>/dev/null
```

#### 1.8 Routes & API

```bash
cat routes/web.php
cat routes/api.php 2>/dev/null
php artisan route:list --path=admin 2>/dev/null
php artisan route:list 2>/dev/null | head -100
```

#### 1.9 Subscription/Billing System

```bash
cat composer.json | grep -i "cashier\|stripe\|paddle"
cat config/cashier.php 2>/dev/null
grep -r "subscription\|plan\|billing" database/migrations/
grep -r "Billable\|subscription" app/Models/
```

#### 1.10 Multi-tenancy

```bash
cat composer.json | grep -i "tenancy\|team\|organization"
grep -r "Tenant\|Team\|Organization\|Workspace" app/Models/
```

#### 1.11 Navigation Audit (CRITICAL)

```bash
grep -r "NavigationItem\|navigationItems\|getNavigation\|menu" app/Filament/ --include="*.php"
grep -r "::make\|NavigationGroup\|navigationLabel\|navigationIcon" app/Filament/ --include="*.php" | head -100
grep -r "Action::make\|Tables\\\\Actions\|->url(\|->link(" app/Filament/ --include="*.php" | head -50
```

### Phase 2: Synthesis

Based on Phase 1 analysis, create:

#### 2.1 Application Purpose Statement
Write 2-3 sentences on what this app does and its core value.

#### 2.2 User/Role Matrix
Create detailed table of all user types with permissions:

| User Type/Role | Access Level | Primary Use Cases | Key Permissions |
|---------------|--------------|-------------------|-----------------|
| Super Admin   | Full         | System config     | Everything      |
| Admin         | High         | Manage users      | CRUD users      |
| Member        | Standard     | Core features     | Own resources   |
| Guest         | Limited      | View only         | Read public     |

#### 2.3 Core User Journeys
Identify the 5-10 most important user flows.

#### 2.4 Entity Relationship Map
Document key models and their relationships.

### Phase 3: Generate Test Plan Document

Create `docs/detailed-test-list.md` with ALL required sections:

```markdown
# [Application Name] - Detailed Test List

> Generated: [Date]
> Application Version: [Version if available]
> Based on analysis of: [Key files analyzed]

## Test Environment Setup

### Prerequisites
- [ ] Application deployed and accessible at: `[URL]`
- [ ] Database seeded with test data
- [ ] Email testing service configured (e.g., Mailtrap)
- [ ] Payment gateway in test mode (if applicable)

### Test User Accounts

| User ID | Email | Password | Role(s) | Plan | Notes |
|---------|-------|----------|---------|------|-------|
| U1 | [email protected] | TestPass123! | Super Admin | - | Full access |
| U2 | [email protected] | TestPass123! | Team Owner | Pro | Team owner |
| U3 | [email protected] | TestPass123! | Member | Free | Standard user |
| U4 | [email protected] | TestPass123! | Viewer | - | Read-only |
| U5 | (to be created) | TestPass123! | User | - | Created via invitation |

### Initial Data State

| Entity | Count | Key Records |
|--------|-------|-------------|
| Users | 4 | See above |
| Teams | 2 | "Acme Corp" (U2 owner), "Beta Inc" (U3 member) |
| [Resource] | X | [Description] |

---

## Section 0: Navigation & Link Cove

Related in Security