Sampling Strategy
Why Sampling Exists
RedeCasas generates pages for:
- 3 scopes
- 27 states
- 5,000+ cities
Testing every city in E2E would take hours. The framework uses tiered sampling.
Catalog Structure
src/fixtures/page-catalog.ts exports:
| Export | Type | Purpose |
|---|---|---|
HOME | PageEntry | Root page |
SCOPES | ScopeEntry[] | casas, jardim, condominios + aliases |
TOPICS | PageEntry[] | Content topics with P1/P2 priority |
SPECIAL | PageEntry[] | Utility pages |
STATES | StateEntry[] | All 27 states |
STATE_SAMPLE_SLUGS | string[] | 6 states for fast runs |
CITY_SAMPLES | Record<string, string[]> | Verified cities per state |
Sampling Controls
| Env Var | Default | Effect |
|---|---|---|
QA_MODE | sampled | critical = P1 only; sampled = P1 + samples; full = everything |
CITY_SAMPLE_SIZE | 3 | Cities per state to test |
Full Mode
state-index.spec.ts: tests all 27 states (not just 6)city-sample.spec.ts: still usesCITY_SAMPLES(no full enumeration yet)