Menu

Testing a Static Directory Build With Lighthouse CI
📰

Testing a Static Directory Build With Lighthouse CI

DEV Community: webdev·SBD Marketing·10 days ago
#27yXICmt
#devtowebdev#devto#dev#directory#pages
Long article (1043 words) — no AI summary yet.
Reading 0:00
15s threshold

A static directory site has an unusual shape for performance testing. It might have thousands of pages, but only a handful of templates: the homepage, county pages, city pages, category pages and listing pages. If one template gets slow, every page built from it gets slow at the same time.

That makes Lighthouse CI a good fit. Instead of auditing a live site by hand after something feels sluggish, you run Lighthouse against a sample of built pages on every change and fail the build when a template regresses. This post walks through a setup for a static directory, which pages to sample and which assertions are worth enforcing.

Why test templates instead of pages

Running Lighthouse on every page of a large directory is slow and mostly redundant. Two city pages built from the same template will score almost identically unless one has far more listings than the other.

The useful sample covers each template at its extremes.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.