name: testing-guideline description: MUST load this BEFORE writing or editing any unit test or integration test in this repo.
Overall
- Test method format: <MethodName>When<SomeConditions><SomeExpectedResult>()
- Setup-test-verify pattern. Use inline comment: // setup, // test, // verify
Unit Testing
- Assemby: A2.Server.UnitTests
- Not everything should be unit tested:
- Test only functions, methods that have well defined input, output or behaviour.
- Test pure functions/classes only. No controllers
Local Integration Testing
- Assemby: A2.Server.Tests
- MUST use ASP.NET integration tests (
WebApplicationFactory, real HTTP client). - MUST fake downstream deps (realistic in-memory, no external calls), never mocks/stubs.
- To fake DynamoDB, MUST use DynamoDB local.
- Duplication across tests is fine — don't extract shared helpers.
- MUST produce four types of tests:
- Type 1: Realistic test data, happy path.
- Type 2: Bad data: extra long string, too short, large integer, negative integer.
- Type 3: Invalid shape data: nulls for required fields, (might need to send RAW json), missing fields, wrong data types etc.
- Type 4: Unauthorized and/or unauthenticaed access.
Related skills
TDD Red-Green-Refactor
Testing
Skill that guides Claude through the complete TDD cycle.
Claude CodeWindsurfintermediate
650
189
2,324
Web Accessibility Audit
Testing
Performs a comprehensive web accessibility audit following WCAG standards.
claudeCursorWindsurfintermediate
129
37
602
UAT Test Case Generator
Testing
Generates structured and comprehensive user acceptance test cases.
claudechatgptintermediate
87
24
533