Custom Rules
Understand how to customize Kerno with custom rules, how to create them, and how they apply to the tests it generates.
Last updated
# .kerno/default.config.yaml
test-generation:
context: |
Error responses use our standard envelope. On every failure, assert the
body matches { error: { code, message } }, not only the status code.
endpoints:
"/api/v1/**": |
Every v1 endpoint is tenant-scoped. Always assert that a request
authenticated as tenant A cannot read or modify tenant B's records.
applications:
payments-api:
test-generation:
context: |
Money amounts are integer minor units, never floats. Idempotency keys
are required on every mutating request.
endpoints:
"POST /api/v1/payments": |
Cover the duplicate-idempotency-key case explicitly: the second
request must return the original payment, not create a second one.