test-case-documentation
Installation
SKILL.md
Test Case Documentation
A test named test_process_3 failed. What broke? Nobody knows without reading 20 lines of setup. The test name is the first line of the failure message — make it count.
The test name is the spec
| Bad name | Why bad | Good name |
|---|---|---|
test_1 |
Says nothing | test_empty_cart_has_zero_total |
test_parse |
Which parse case? | test_parse_rejects_trailing_comma |
test_auth_error |
Which error? Which auth? | test_expired_session_returns_401 |
test_edge_case |
Which edge? | test_discount_caps_at_100_percent |
testProcessOrderSuccess |
"Success" — but what is success here? | testProcessOrder_reservesInventory_thenCharges |
Naming pattern: test_<scenario>_<expected outcome>. The scenario is the input/state; the outcome is what you assert.
The rename test (from code-comment-generator)
Before writing a docstring, try renaming the test. If the name says it all, no docstring needed: