Codex Spellbook Testing for Parameterized Boundary Cases
Structure tests around setup, one action, and an observable result. Consolidate repeated cases when they exercise the same behavior and name each input so failures are useful.
中文Install in Codex
Codex and a project with an existing test runner. The Python example uses pytest, but the target project can use its native runner.
- Copy the pinned `skills/testing/` directory into `.agents/skills/testing/` in the target project.
- Open the project in Codex and invoke `$testing` for the specific test change.
Example task
For a practice price function, cover no discount, a ten percent discount, and a rounding boundary. Ask for a parameterized test with meaningful case labels.What to check
Expect three labeled cases asserting the final price. A failure identifies the specific case and its observed value.
Original SKILL.md on GitHub · Updated
Frequently asked question
Should a deterministic function be mocked?
Test its output directly. Use test doubles at unstable external boundaries.