- Home
- Skills
- Testing & Debugging
- Checkable Test Cases: One Fact per Expected Result
Works with the AI Agents you already use
Checkable Test Cases: One Fact per Expected Result
by doo_sani
Test cases written by agents often bundle several checks into one line, check the screen for facts that live in the database, or invent a limit nobody agreed on.
Free
Checkable Test Cases: One Fact per Expected Result
Example session with this skill installed
Write the test cases for the orders listing and refund feature. The requirement is docs/REQUIREMENTS.md (ticket #482); the code is in src/.
- Read your context and instructions
- Compiled the checkable test cases
Requirement (docs/REQUIREMENTS.md)
1. A signed-in customer sees their own orders, 20 per page, newest first.
2. The list can be filtered by status (paid, refunded, partially_refunded).
3. Support staff can refund part or all of a paid order.
4. A refund can never exceed what is left to refund on that order.
5. When the whole amount has been refunded, the order's status becomes "refunded".
Result
docs/tc/orders-refunds.tc.json: 20 test cases, 36 expected results (25 checked in the API response, 11 in the database).
$ node tc-lint.js docs/tc/orders-refunds.tc.json
tc-lint: 20 TC (13 ready, 7 needs-decision), 0 warning(s)
Orders listing and refunds (ticket #482) — test cases
20 test cases · 36 expected results · 7 need a decision
| ✓ | TC | Steps | Expected result | Check in | Basis |
|---|---|---|---|---|---|
| ☐ | TC.orders-refunds.list-first-page-size | 1. Request the orders list without a page parameter | The response array holds 20 orders | api: handleList response body length | requirement (REQ.orders-01) |
| ☐ | TC.orders-refunds.list-first-page-newest | 1. Request the orders list with page 1 [page_1] | The first element is the customer's order with the latest created_at | api: handleList response body[0].id | requirement (REQ.orders-01) |
| ☐ | TC.orders-refunds.list-first-page-newest | created_at never increases from one element to the next | api: handleList response body[*].created_at | ||
| ☐ | TC.orders-refunds.list-second-page | 1. Request the orders list with page 2 [page_2] | The response array holds 5 orders | api: handleList response body length | requirement (REQ.orders-01) |
| ☐ | TC.orders-refunds.list-second-page | The first element is the customer's 21st newest order | api: handleList response body[0].id | ||
| ☐ | TC.orders-refunds.list-own-orders-only | 1. Request the orders list | Every element has user_id equal to the signed-in customer's id | api: handleList response body[*].user_id | requirement (REQ.orders-01) |
(… 36 rows in total)
Open questions (instead of invented values)
- What a page past the end, page 0 or a non-number page returns. Proposed: past the end → 200 with an empty list; the others → 400.
- Which order statuses may be refunded; the code only blocks "refunded". Proposed: only paid or partially_refunded.
- Whether amounts are integer cents. With decimals,
refunded === paidcan miss a full refund. Proposed: integer cents. - What a signed-out list request returns; the handler reads
req.user.idwith no check. Proposed: 401.
Spotted while reading the code
src/orders.js:7:offset = page * PAGE_SIZEskips the first 20 orders on page 1, so the page-1 cases will fail.src/api.js:4still passes a number to the new{ page, status }signature, so the status filter is ignored.
Connects securely to your tools. The creator never sees your data.
About this skill
"The order is saved correctly" cannot be failed. Test cases written by agents often bundle several checks into one line, check the screen for facts that live in the database, or invent a limit nobody agreed on.
Checkable Test Cases writes cases a person or a script can decide.
What you get
- User actions first, then separate cases for the success path and each rejection, error, boundary, cancel or retry the behaviour actually has.
- One fact per expected result, each with where to check it:
api: response body[0].id,db: orders.status,log: mail.reset.sent, or a screen element. - Traceability: every case rests on a requirement line, a code line (flagged as a spec gap), or a proposal waiting for a decision.
- Open questions instead of guesses: a value nobody stated (a limit, a status rule, a unit) becomes a question with a proposed default, and its cases stay "needs decision".
- A linter that flags bundled facts, subjective words, off-screen facts checked on the screen, steps that cannot show they are done, mixed success and error cases, missing preconditions, URLs or results in the file, and requirements no case covers. Works on English and Korean sentences.
- A checklist renderer: Markdown with checkboxes, or CSV for a spreadsheet.
Output
A JSON file in your repo (docs/tc/<feature>.tc.json) that agents and scripts can read, plus a checklist people can tick.
Safe to install
Node.js 18+, no dependencies, no network calls. The scripts only read the file you give them.
Where it stops
It writes and checks test cases; it does not run them. The linter's checks are heuristics and warn only.
It writes and checks test cases; it does not run them. The linter's checks are wording heuristics and warn only: a clean lint means no known pattern of vague or bundled lines, not that every case is right. Requires Node.js 18+ for the two scripts.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 5 days ago
- Free with an Agensi account
- Software
Node.js
Permissions
File Scopes
No network access. The scripts only read the test-case file you give them and print to stdout. The agent writes docs/tc/<feature>.tc.json in your project.
What's inside
Frequently Asked Questions
New in Testing & Debugging
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.