AidertestingTesting

Testing Aider Conventions

Aider conventions for tests: structure, naming, and testing philosophy for maintainable test suites.

CONVENTIONS.md
- Name test functions: test_<function_name>_<scenario>_<expected_result>
- Never test private functions; test through public interfaces only
- Each test should verify exactly one behavior; use comments to explain intent
- Share setup with fixtures or before-each hooks; avoid duplication
- Use explicit assertions with meaningful failure messages
- Keep tests deterministic: no random data, no time-dependent logic, mock external
- Delete tests that are consistently skipped or ignored; they're technical debt
- Review test coverage by behavior coverage, not just line coverage

How to use with Aider

Create a `CONVENTIONS.md` file in your project root. Aider reads this and respects your conventions when generating changes.

#testing#aider#conventions#tdd#coding-rules

Related Rules