Performance goals
In-page Web Vitals vs Lighthouse category scores: what the runner measures today and when to keep Lighthouse CI or RUM.
Schema validation allows goals with type: performance alongside browser (and reserved native). The runner opens the same navigation path as a browser goal (environment base_url plus optional start_path), then evaluates success_criteria on that page.
Two complementary layers:
- In-session Web Vitals (Performance API) —
structured_checkswith paths such asvital:lcp,vital:fcp,vital:cls(andweb_vitals:aliases). These read metrics from the Playwright page after load; they respect your session (e.g.storage_state) and are cheap enough for many CI suites. Thresholds use the same units as indocs/testing/config-reference-mvp.md. - Lighthouse-style audits —
structured_checkswithlighthouse:performance,lh:accessibility,lighthouse:full, etc. The runner invokes Lighthouse in a separate headless Chrome against the current URL; it does not inherit Playwright cookies or storage. Best for public URLs, smoke pages, or when you accept a second browser. Skip withRESTORMEL_TESTING_SKIP_LIGHTHOUSE=1; tuneRESTORMEL_TESTING_LIGHTHOUSE_TIMEOUT_MS.
Practical guidance: keep deep budgets, custom traces, or authenticated Lighthouse flows in Lighthouse CI, RUM, or existing Playwright perf jobs where you already solved auth. Use Restormel performance-typed goals
for goal-level gates that match the YAML you version in-repo; confirm shapes in docs/testing/config-reference-mvp.md.
Retiring old perf baselines
When migrating from legacy Lighthouse CI or static “perf budget” gates:
- Overlap briefly — run Restormel checks and your existing gate in parallel until scores stabilise on the same URLs.
- Do not assume parity — in-page vitals vs Lighthouse categories measure different things; auth and cold-load behaviour differ between the Playwright session and Lighthouse’s separate Chrome.
- When Restormel checks cover your risk, narrow or remove redundant jobs deliberately rather than dropping coverage in one step.
Authoritative references
Field behaviour and env tables: docs/testing/config-reference-mvp.md and docs/testing/restormel-testing-technical-architecture.md.