Update coding standards and testing guidelines

- Revised coding rules to emphasize readability, meaningful comments, and maintainability.
- Adjusted thresholds for test coverage on business logic from 80% to 75%, aligning with the new quality standards.
- Enhanced guidelines for handling skipped tests, introducing classifications for legitimate and illegitimate skips.
- Updated the requirements for test scenarios to ensure every test has a clear pass/fail criterion.

Made-with: Cursor
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-04-17 16:19:32 +03:00
parent 5ad5d81a15
commit 320683a1fd
17 changed files with 275 additions and 90 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ globs: ["**/*test*", "**/*spec*", "**/*Test*", "**/tests/**", "**/test/**"]
- One assertion per test when practical; name tests descriptively: `MethodName_Scenario_ExpectedResult`
- Test boundary conditions, error paths, and happy paths
- Use mocks only for external dependencies; prefer real implementations for internal code
- Aim for 80%+ coverage on business logic; 100% on critical paths
- Aim for 75%+ coverage on business logic; 100% on critical paths (code paths where a bug would cause data loss, security breaches, financial errors, or system outages — identify from acceptance criteria marked as must-have or from security_approach.md). The 75% threshold is canonical — see `cursor-meta.mdc` Quality Thresholds.
- Integration tests use real database (Postgres testcontainers or dedicated test DB)
- Never use Thread Sleep or fixed delays in tests; use polling or async waits
- Keep test data factories/builders for reusable test setup