AureusERP Test Case Builder
Use this skill to build plugin API tests with Pest using test-only fixes and reusable helpers.
Scope Tracks
- API test-case track (active now)
- Follow
references/api.mdfor end-to-end workflow, helper boundaries, assertions, and guardrails.
- Filament test-case track (reserved for future)
- Do not invent Filament-specific testing rules in this skill yet.
- Keep API conventions unchanged.
- When Filament guidance is added later, it should be added as separate references (for example
references/filament-*.md) and selected explicitly by task type.
Core Rules
- Use Pest feature tests for API endpoints (
getJson,postJson,patchJson,deleteJson). - Prefer factories for setup and payload creation.
- Keep helper responsibility split strict:
SecurityHelperfor auth/permissions/guards.TestBootstrapHelperfor non-security bootstrap and plugin installation.
- Do not use
RefreshDatabaseorLazilyRefreshDatabasein test files; use globalDatabaseTransactionswiring. - Prefer test/helper fixes before app code edits.
- Do not use skip-as-solution.
Quick Routing
- API controller endpoint tests (
index/store/show/update/destroy, auth, validation, restore/force-delete): usereferences/api.md. - API refactor/bugfix with helper cleanup: use
references/api.md. - Template generation for a new plugin API test file: use
references/api.md.
Output Expectations
- Keep tests plugin-scoped and reusable.
- Keep assertions deterministic and aligned with JSON resources.
- Keep payloads factory-first with targeted overrides only.
- Keep install/bootstrap non-interactive and environment-safe.