Cairo Testing
Use this entrypoint to choose test scope and sequence, then load specific patterns from references.
When to Use
- Building unit, integration, fuzz, or fork tests.
- Designing regression tests for known findings.
- Validating event and failure semantics.
When NOT to Use
- Contract architecture decisions (
cairo-contract-authoring). - Performance tuning (
cairo-optimization). - Deployment operations (
cairo-toolchain).
Quick Start
- Add unit tests for all state-mutating selectors.
- Add negative tests for auth/input failures.
- Add at least one fuzz/property test for core invariants.
- Convert fixed findings into permanent regression tests.
- Run
cairo-auditor; fix or explicitly triage/document new findings first, then add regression tests before merge.
Workflow
- Main testing flow: default workflow
References
- Detailed testing reference: legacy reference
- Module index: references index
- Security regression recipes:
../datasets/distilled/test-recipes/