Codex Assert Mock API Mutation Payloads in ToolHive Studio
Use the ToolHive Studio test recorder to assert path, method, and payload for a mocked write operation.
中文Install in Codex
Use the local ToolHive Studio renderer test environment with its mock API setup.
- Copy the pinned `.codex/skills/testing-api-assertions/` directory into `.agents/skills/testing-api-assertions/` in the project.
- Identify the test in Codex and inspect `renderer/src/common/mocks/node.ts` to confirm the request recorder.
Example task
In a local test, create `demo-group` through the UI. Use `recordRequests()` to find `POST /api/v1beta/groups` and verify the group name in its payload.What to check
One matching POST is recorded with name `demo-group`, using the mock rather than a live backend.
Original SKILL.md on GitHub · Updated
Frequently asked question
Should I assert raw requests for list reads too?
Use different mock responses to verify the visible list. Mutation tests can additionally assert the side-effect contract.