aureuserp-test-case-builder
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAureusERP Test Case Builder
AureusERP 测试用例构建器
Use this skill to build plugin API tests with Pest using test-only fixes and reusable helpers.
使用本技能基于Pest构建插件API测试,采用仅测试层面的修复方案和可复用helpers。
Scope Tracks
测试赛道
- API test-case track (active now)
- Follow for end-to-end workflow, helper boundaries, assertions, and guardrails.
references/api.md
- 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 ) and selected explicitly by task type.
references/filament-*.md
- API测试用例赛道(当前启用)
- 端到端工作流、helper职责边界、断言规则和约束规范请遵循。
references/api.md
- Filament测试用例赛道(预留未来使用)
- 目前请勿在本技能中自定义Filament专属的测试规则。
- 保持API约定不变。
- 后续新增Filament相关指引时,应作为独立参考文档添加(例如),并通过任务类型显式选择。
references/filament-*.md
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:
- for auth/permissions/guards.
SecurityHelper - for non-security bootstrap and plugin installation.
TestBootstrapHelper
- Do not use or
RefreshDatabasein test files; use globalLazilyRefreshDatabasewiring.DatabaseTransactions - Prefer test/helper fixes before app code edits.
- Do not use skip-as-solution.
- 针对API端点使用Pest功能测试(使用、
getJson、postJson、patchJson方法)。deleteJson - 优先使用测试工厂进行环境搭建和payload构造。
- 严格划分helper职责:
- 负责认证/权限/守卫相关逻辑。
SecurityHelper - 负责非安全类的引导配置和插件安装。
TestBootstrapHelper
- 测试文件中请勿使用或
RefreshDatabase;请使用全局的LazilyRefreshDatabase配置。DatabaseTransactions - 优先通过测试/helper修复问题,而非修改应用代码。
- 不得将跳过测试作为解决方案。
Quick Routing
快速路由
- API controller endpoint tests (, auth, validation, restore/force-delete): use
index/store/show/update/destroy.references/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
- API控制器端点测试(含、认证、校验、恢复/强制删除):参考
index/store/show/update/destroy。references/api.md - 涉及helper清理的API重构/问题修复:参考。
references/api.md - 新插件API测试文件的模板生成:参考。
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.
- 测试需保持插件作用域隔离,且具备可复用性。
- 断言需具备确定性,且与JSON资源对齐。
- payload优先使用测试工厂生成,仅在必要时进行针对性覆盖。
- 安装/引导过程需为非交互式,且保证环境安全。