Software Testing Principles, Test Pyramid & AAA Pattern
Learn the Test Pyramid (Unit vs Integration vs E2E), FIRST test characteristics, boundary value testing, and Arrange-Act-Assert pattern.
Learning Objectives & The Test Pyramid
### Learning Objectives
- Differentiate between Unit, Integration, and End-to-End (E2E) testing tiers in the Test Pyramid.
- Structure readable test cases using the **Arrange-Act-Assert (AAA)** pattern.
- Apply F.I.R.S.T. unit test properties (Fast, Independent, Repeatable, Self-validating, Timely).
- Perform Boundary Value Analysis (BVA) to detect edge case defects.
---
### The Testing Pyramid Architecture
1. **Unit Tests (70%)**: Fast, isolated tests evaluating pure functions and individual methods without network or database dependencies.
2. **Integration Tests (20%)**: Tests evaluating multi-component interactions (e.g. API route connecting to database).
3. **E2E Tests (10%)**: Slow, browser-level user journey flows verifying end-to-end system health.