Skip to content

Run the site check in fewer browsers, with cases in parallel - #1097

Open
beetlebugorg wants to merge 2 commits into
mainfrom
site-browser-pool
Open

beetlebugorg wants to merge 2 commits into
mainfrom
site-browser-pool

Conversation

@beetlebugorg

Copy link
Copy Markdown
Owner

Summary

  • The new tests/browser-pool.mjs runs the 23 pages that tests/site.sh gave to tests/browser.mjs: the observe panel at 3 viewports, the posters in 2 schemes, and the 18 cases of the size check.
    • Before, each page started a new Chrome. Now there is one Chrome for each set of flags (light and dark).
    • Each case gets a new browser context (Target.createBrowserContext) and a target with its window size and viewport.
    • SITE_JOBS cases run at the same time. The default is the count of CPUs.
    • A case that passes its limit ends alone, and the browser stays up for the others.
  • The checks read the file of each case in a fixed order, so the log keeps the same order in each run.
  • The fonts pass of tests/pages.mjs (820 pages) opens SITE_JOBS pages at the same time, each in a browser context of its own. It prints the lines in the order of the paths.
  • tests/touch.mjs, the longest test (about 675 s), runs in the background beside the other tests. Its lines come at its old place in the log.
  • tests/flicker.mjs measures frames on a slow network, so it stays one page at a time. tests/web.sh and tests/docs-live.sh do not change.

Refs #1087

Tests

Measured on 2026-12-04, on the Linux cloud box with 4 CPUs, Node 24, and google-chrome, with tests/site.sh after zig build wasm:

Time ok lines FAIL lines
main (03e735b) 1851 s 1170 0
this branch 859 s 1170 0
  • With the numbers taken out, the lines are the same and in the same order. The exception is the pixel counts of three poster lines, which also change from run to run on main.
  • On main, the fit line gave "0 examples show their whole window". On this branch it gives 36. The fit pass now opens its tab in a new browser context. This run did not show why main got 0.
  • This branch did not run on a GitHub runner. The next gate run gives that time.

tests/site.sh started a new Chrome for each page of tests/browser.mjs,
23 in all, and ran them one at a time. The new tests/browser-pool.mjs
runs those cases in one browser for each set of flags, each case in a
new browser context, with SITE_JOBS cases at the same time (the count
of CPUs by default). A case that passes its limit ends alone, and the
browser stays up. The checks then read the file of each case in a
fixed order, so the log keeps its order.

The fonts pass of tests/pages.mjs opens SITE_JOBS pages at the same
time, each in a browser context of its own, and prints the lines in
the order of the paths. tests/touch.mjs, the longest test, runs in the
background beside the other tests, and its lines come at its place.

Refs #1087
@beetlebugorg beetlebugorg added this to the v1.0.0-beta.10 milestone Dec 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant