Q26 of 38 · Performance
What are Core Web Vitals and why do they matter for web performance testing?
Short answer
Short answer: Core Web Vitals are Google's set of user-experience performance metrics: LCP (Largest Contentful Paint — load speed), INP (Interaction to Next Paint — responsiveness), and CLS (Cumulative Layout Shift — visual stability). They matter because they directly affect SEO ranking and perceived user experience.
Detail
Each metric has a threshold:
- LCP: measures load speed of the largest visible content element. Good: under 2.5 s. Poor: over 4 s.
- INP: measures the worst interaction latency (replaced FID in 2024). Good: under 200 ms. Poor: over 500 ms.
- CLS: measures how much visible content shifts during load. Good: under 0.1. Poor: over 0.25.
For QA, Core Web Vitals are measured in two contexts: lab (Lighthouse in CI, which measures against a synthetic page load) and field (Chrome UX Report / RUM data from real users). Lab data catches regressions early; field data shows the real distribution across device types and network conditions.
Integrate Lighthouse into CI using the Lighthouse CI npm package. Set budgets for each metric and fail the build on regression. This treats frontend performance as a first-class quality gate, not a one-off audit.