

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1234567# Testing Rules89These rules apply when writing or modifying tests.1011## Testing Stack1213- **Unit/Integration**: pytest with pytest-asyncio14- **E2E**: Docker-based framework (`docker-compose.test.yml`)15- **Coverage**: pytest-cov1617## Test Organization1819```20tests/21 unit/ # Fast, isolated unit tests22 integration/ # API and database integration tests23 e2e/ # End-to-end tests (Docker required)24```2526## Running Tests2728```bash29# Unit tests30pytest tests/unit/3132# Integration tests33pytest tests/integration/3435# E2E tests36pytest tests/e2e/37# or: make test-e2e3839# All tests40pytest tests/ -v4142# Full CI validation43{{CI_VALIDATE_COMMAND}}44```4546## Test Patterns4748### API Integration Tests4950See `patterns_library/testing/api-integration-test.md` for the full pattern.5152Key points:53- Mock authentication for isolated testing54- Verify RLS context is used (no direct ORM calls)55- Test both success and error paths56- Test authentication failures (401)57- Test authorization failures (403)58- Test input validation errors (422)5960### E2E Tests6162See `patterns_library/testing/e2e-user-flow.md` for the full pattern.6364Key points:65- Use `docker-compose.test.yml` for infrastructure66- Test complete user journeys67- Include login/auth setup in fixtures68- Clean up test data after each run6970## Writing Good Tests71721. **Independent**: Tests must not depend on execution order732. **Repeatable**: Same result every time, no flaky tests743. **Clear naming**: `test_<what>_<condition>_<expected>`754. **Arrange-Act-Assert**: Follow the AAA pattern765. **Edge cases**: Cover boundary conditions, empty states, error paths776. **RLS isolation**: Verify user A cannot access user B's data7879## Coverage Requirements8081- Business logic: Aim for high coverage82- API endpoints: All routes should have integration tests83- Security paths: Authentication and authorization MUST be tested84- Error handling: All error responses MUST be tested8586## Acceptance Criteria Verification8788When testing a spec, map each acceptance criterion to at least one test:8990```python91# From spec: "User can create new resource"92def test_user_can_create_resource():93 ...9495# From spec: "Validation shows errors for invalid input"96def test_create_resource_invalid_input_returns_422():97 ...9899# From spec: "Unauthorized access returns 401"100def test_create_resource_unauthenticated_returns_401():101 ...102```103104## Key References105106- `patterns_library/testing/` -- Test patterns (copy-paste ready)107- `AGENTS.md` -- QAS role definition and validation commands108- `CONTRIBUTING.md` -- CI pipeline test stages109
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| bybren-llc/safe-agentic-workflow.cursor/rules/00-core-principles.mdc · 399 | Cursor rules | no sections | 48/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/01-git-workflow.mdc · 399 | Cursor rules | lint-formatstyletypesgit+2 | 85/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/02-pattern-discovery.mdc · 399 | Cursor rules | stylearchgitdo-not+2 | 73/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/03-safe-ai-dlc.mdc · 399 | Cursor rules | styledo-not | 59/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/04-knowledge-vault.mdc · 399 | Cursor rules | stylegitapido-not | 73/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/10-backend-python.mdc · 399 | Cursor rules | testlint-formatstylegit+4 | 97/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/11-frontend-react.mdc · 399 | Cursor rules | buildstyletypessecurity+3 | 65/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/12-database-sql.mdc · 399 | Cursor rules | testtypesgitsecurity+3 | 69/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/14-spec-creation.mdc · 399 | Cursor rules | teststylegitdo-not | 69/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/15-deployment.mdc · 399 | Cursor rules | setuptestgitsecurity+2 | 80/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/16-stripe-payments.mdc · 399 | Cursor rules | testdo-not | 61/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/20-agent-architect.mdc · 399 | Cursor rules | stylearchgit | 58/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/21-agent-backend.mdc · 399 | Cursor rules | testlint-formatstyleapi+1 | 85/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/22-agent-qas.mdc · 399 | Cursor rules | teststylesecurityagent-behaviour | 81/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/23-agent-security.mdc · 399 | Cursor rules | stylesecurity | 52/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/30-background-agents.mdc · 399 | Cursor rules | testlint-formatstylegit+1 | 74/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/31-mcp-integration.mdc · 399 | Cursor rules | stylesecuritydo-notagent-behaviour | 61/100 | today | |
| bybren-llc/safe-agentic-workflow.gemini/GEMINI.md · 399 | GEMINI.md | lint-formatstylearchgit+4 | 66/100 | today | |
| bybren-llc/safe-agentic-workflowAGENTS.md · 399 | AGENTS.md | buildteststylearch+5 | 84/100 | today | |
| bybren-llc/safe-agentic-workflowCLAUDE.md · 399 | CLAUDE.md | buildtestlint-formatarch+6 | 91/100 | today |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| bybren-llc/safe-agentic-workflow.cursor/rules/10-backend-python.mdc · 399 | Cursor rules | testlint-formatstylegit+4 | 97/100 | today |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/bybren-llc-safe-agentic-workflow-cursor-rules-13-testing)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.