Skip to content

PDJB-NONE: [EXPERIMENT] Block external analytics requests in integration tests - #1671

Draft
Travis-Softwire wants to merge 8 commits into
mainfrom
chore/PDJB-NONE-test-parallelism-experiment
Draft

PDJB-NONE: [EXPERIMENT] Block external analytics requests in integration tests#1671
Travis-Softwire wants to merge 8 commits into
mainfrom
chore/PDJB-NONE-test-parallelism-experiment

Conversation

@Travis-Softwire

Copy link
Copy Markdown
Collaborator

Experiment branch — not for merge.

Measuring whether removing the external analytics request from the test critical path speeds up CI.

The layout renders <script async src="https://plausible.io/js/pa-...js"> from a hardcoded constant (PLAUSIBLE_URL), not from the configurable plausible.base-url. So every page load in every integration test makes a real external HTTPS request. Being an async script it delays the window load event, which ClickAndWaitable.clickAndWait waits for — putting an internet round trip on the critical path of every interaction. Each test gets a fresh BrowserContext, so the browser cache never helps.

This branch aborts those requests via page.route, and temporarily uploads build/test-results so each run yields per-class timings rather than one noisy wall-clock number.

Control: the reset-only branch measured 21.0 / 22.7 / 21.4 min (mean 21.7) for the gradle check step over three runs of identical code.

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