This file is an execution runbook for TestAgent.
Goal: run the full testing checklist end-to-end and return objective PASS/FAIL evidence.
- Primary role:
TestAgent - Supporting roles (only if needed):
BackendImplementationAgent,ReviewAgent
Load these skills first:
- Core testing:
pesttesting,phpunit,phpstan - Quality and formatting:
php,general - Domain skills by touched files:
models,enums,jobs
Skill references:
resources/boost/skills/pesttesting/SKILL.mdresources/boost/skills/phpunit/SKILL.mdresources/boost/skills/phpstan/SKILL.mdresources/boost/skills/php/SKILL.mdresources/boost/skills/general/SKILL.mdresources/boost/skills/models/SKILL.mdresources/boost/skills/enums/SKILL.mdresources/boost/skills/jobs/SKILL.md
Use this to launch TestAgent:
Act as TestAgent for this Laravel project. Read and follow
TESTS.md,AGENTS.md, and relevant skills inresources/boost/skills/**/SKILL.md. Execute the entire checklist in deterministic order, produce required evidence for each section, and do not silently skip any step. If blocked, markBLOCKEDwith reason and remediation.
The run is PASS only if all of the following are true:
- Test suite result:
0failing tests. - PHPStan result:
0errors at Level 9. - Pint result:
0remaining formatting violations. - Checklist result: no unresolved
FAILorBLOCKEDitems.
- Any step that cannot run must be marked
BLOCKED. - Every
BLOCKEDitem must include:- blocking reason
- impact
- exact next remediation step
- Never report
PASSif any item isBLOCKED.
Run steps in this exact order:
- Scope detection and class inventory.
- Map classes to required test files.
- Add/update missing tests by class type.
- Run targeted tests for changed scope.
- Run full test suite.
- Run
vendor/bin/phpstan analyse(Level 9). - Run
vendor/bin/pint. - Produce final evidence report.
php artisan testvendor/bin/phpstan analysevendor/bin/pint
Optional while iterating:
vendor/bin/pestvendor/bin/phpunit
Every touched class type requires a dedicated test file (no mega test files).
App\Models\Invoice->tests/Unit/Models/InvoiceTest.phpApp\Actions\ProcessInvoice->tests/Unit/Actions/ProcessInvoiceTest.phpApp\Services\BillingService->tests/Unit/Services/BillingServiceTest.phpApp\Http\Controllers\InvoiceController->tests/Feature/Http/Controllers/InvoiceControllerTest.phpApp\Http\Middleware\EnsureTenant->tests/Feature/Http/Middleware/EnsureTenantTest.phpApp\Livewire\Invoices\CreateInvoice->tests/Feature/Livewire/Invoices/CreateInvoiceTest.php
For each touched class, include as applicable:
- Happy path behavior
- Validation/guard path
- Failure/error path
- Authorization path
- Side effects and contract assertions
- Identify all new/changed PHP classes in current change set.
- Map each class to test type (
UnitorFeature). - Confirm no changed class is left without dedicated test coverage.
- Every new/changed class has dedicated automated tests.
- Prefer Pest syntax for new tests unless area is intentionally PHPUnit class-based.
- Use deterministic test setup (factories/states over ad-hoc inserts).
- Do not remove tests without explicit approval.
- Dedicated model test file exists.
- CRUD covered (create/read/update/delete or soft delete).
- Casts/helpers asserted.
- Every relation tested for type and behavior.
- Dedicated enum test file exists.
- All cases verified.
-
label()andcolor()verified per case. - Backward compatibility checked for persisted values.
- Model enum casting verified where used.
- Dedicated job test file exists.
- Dispatch path tested.
-
handle()delegation to Action/Service tested. - Queue controls tested (
$tries,$backoff,$timeout,$queue) where relevant. -
failed()behavior tested for critical jobs.
- Dedicated action test file exists.
- Public contract (
executeor equivalent) tested. - Success/failure and side effects asserted.
- Dedicated command test file exists.
- Arguments/options matrix tested.
- Success/failure exit code assertions exist.
- Key console output assertions exist.
- Dedicated DTO test file exists.
- Construction/defaults/type invariants tested.
- Normalization/serialization round-trip tested.
- Invalid/edge input behavior tested where relevant.
- Dedicated component test file exists.
- Render and interaction flow tested.
- Validation/authorization tested.
- Emitted events and persistence effects tested.
- Dedicated notification test file exists.
- Channel routing tested (
mail,database,broadcast, etc. as used). - Payload/content contract tested.
- Dedicated observer test file exists.
- Expected event-driven side effects tested.
- Explicit "no unintended side effects" assertion exists where relevant.
- Dedicated policy test file exists.
- Method-by-method allow/deny matrix tested for relevant actor roles.
- Dedicated provider test file exists.
-
registerbindings tested (binding/singleton resolution). -
bootbehavior tested (macros/events/wiring where applicable).
- Dedicated service test file exists.
- Public contract/orchestration tested.
- External dependencies are intentionally mocked/faked.
- Failure handling and side effects asserted.
- Dedicated trait test file exists.
- Trait tested via minimal fixture class.
- Method composition/collision behavior covered where relevant.
- Dedicated feature test file exists.
- Route/controller contract assertions cover status + payload shape.
- Validation/auth/authz/error paths covered.
- Side effects (DB/events/jobs/notifications) asserted where applicable.
- Dedicated middleware test file exists.
- Pass-through and blocked behavior covered.
- Matrix includes guest/authenticated/role/state combinations as relevant.
- Response effects asserted (redirect/status/headers/context).
Define and test all relevant states per changed view/component:
-
empty -
partialData -
fullData -
loading -
error -
unauthorized -
forbidden -
disabled -
archived
Rules:
- Every changed view/template is called by tests (directly or through endpoint/component).
- A state matrix is explicitly documented in tests/comments.
- At least one key visible/behavior assertion exists per covered state.
- Targeted tests for changed scope pass.
- Full test suite passes (
php artisan test). - PHPStan Level 9 passes (
vendor/bin/phpstan analyse). - Pint passes (
vendor/bin/pint).
Attach concise evidence for each run:
- Scope inventory (changed classes and mapped test files).
- Test results summary (targeted + full).
- PHPStan summary (Level 9, error count).
- Pint summary (violations/fixes).
- List of test files created or updated.
Use this exact structure:
Scope
- <changed class list>
Added/Updated Tests
- <test file list>
Checklist Status
- Section 1: PASS|FAIL|BLOCKED
- Section 2: PASS|FAIL|BLOCKED
- Section 3: PASS|FAIL|BLOCKED
- Section 4: PASS|FAIL|BLOCKED
- Section 5: PASS|FAIL|BLOCKED
- Section 6: PASS|FAIL|BLOCKED
Blockers
- <none or detailed blockers with remediation>
Final Verdict
- Full TESTS.md checklist passed