Testing Patterns
Principles for reliable test suites.
-
Testing Pyramid
/\ E2E (Few) / \ Critical flows/----
/ \ Integration (Some) /--------\ API, DB queries /
/------------\ Unit (Many) Functions, classes -
AAA Pattern
Step Purpose
Arrange Set up test data
Act Execute code under test
Assert Verify outcome
- Test Type Selection
🧠 Knowledge Modules (Fractal Skills)
-
When to Use Each
-
Good Unit Tests
-
What to Unit Test
-
What to Test
-
Setup/Teardown
-
When to Mock
-
Mock Types
-
Naming
-
Grouping
-
Strategies
-
Principles