Pular para o conteúdo

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:

ExportTypePurpose
HOMEPageEntryRoot page
SCOPESScopeEntry[]casas, jardim, condominios + aliases
TOPICSPageEntry[]Content topics with P1/P2 priority
SPECIALPageEntry[]Utility pages
STATESStateEntry[]All 27 states
STATE_SAMPLE_SLUGSstring[]6 states for fast runs
CITY_SAMPLESRecord<string, string[]>Verified cities per state

Sampling Controls

Env VarDefaultEffect
QA_MODEsampledcritical = P1 only; sampled = P1 + samples; full = everything
CITY_SAMPLE_SIZE3Cities per state to test

Full Mode

  • state-index.spec.ts: tests all 27 states (not just 6)
  • city-sample.spec.ts: still uses CITY_SAMPLES (no full enumeration yet)