Skip to content

test(e2e): make the suite independent of the network and the runner - #959

Merged
PaulHax merged 9 commits into
Kitware:mainfrom
PaulHax:e2e-hermetic-ci
Sep 21, 2026
Merged

PaulHax merged 9 commits into
Kitware:mainfrom
PaulHax:e2e-hermetic-ci

Conversation

@PaulHax

@PaulHax PaulHax commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

An e2e failure should mean the app is wrong. It could also mean a data host was slow or a wait ran out of time, and a WebGL failure could pass unnoticed in one spec while the same kind of failure broke an unrelated one. This removes the network dependency, makes WebGL failures visible where they happen, and stops per-call timeouts from growing.

Test data

  • Every dataset is listed once in tests/datasets.ts and downloaded before any spec or test timer starts. Specs and the two 5.0.1 session fixtures read them from the local server at /tmp/<name>. They are the same real files as before, including the rotated direction matrix prostate series.
  • The files are assets of the test-data-1 release on this repository, so the only host CI depends on for data is the one it already runs on. Each file has a sha256 that is checked on download and against the cache. One attempt, and a failure aborts the run naming the dataset.
  • CI caches the datasets. A cache saved by a pull request run is only visible to that pull request, so a small workflow on main keeps one where every PR can restore it. It runs the download module with node and does not install dependencies.

Guards (tests/rootHooks.ts, mocha root hooks)

  • A test fails if the page requested a non-local URL, or logged a shader compile failure, a lost context, or a vtk setContext null access.
  • A WebDriver BiDi network intercept or browser.mock, even one that matches nothing, stalls the app's data loading in Chrome. The sample data spec swaps its one address with addInitScript instead.

Fonts (the one change to the app)

  • index.html loaded Roboto from Google Fonts and an unpinned @mdi/font@latest from jsdelivr, both render blocking. An offline or firewalled deployment lost its icons. They are now bundled. Font files are not inlined, so unicode-range subsets stay lazy, and only the woff2 icon font is built. A page load fetches four font files.

Shader compile failure in session-large-uri-base

  • Allocating the 1024x1024x256 float volume texture fails with GL_OUT_OF_MEMORY on software GL. The volume mapper then fails to compile its shader with an empty log, and the context is lost afterwards. The spec passed anyway because it only looked for a RangeError. It covers the wasm heap, so it now loads with an axial-only layout.

Timeouts

  • ESLint rejects a new timeout: property or browser.pause in specs and page objects. The files that still have one are listed as debt in eslint.config.js, so the list can only shrink. Replacing them with waits on state the app publishes is follow-up work.

@netlify

netlify Bot commented Sep 21, 2026

Copy link
Copy Markdown

Deploy Preview for volview-dev ready!

Name Link
🔨 Latest commit 9755f79
🔍 Latest deploy log https://app.netlify.com/projects/volview-dev/deploys/6ab171e42f5df20008f6ac90
😎 Deploy Preview https://deploy-preview-959--volview-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Specs and the two 5.0.1 session fixtures fetched from data.kitware.com while a test timer
was running, so a slow host failed whichever spec happened to be waiting. All datasets now
live in tests/datasets.ts, are downloaded once in onPrepare, and are read from the local
server. A failed download aborts the run and names the dataset. CI caches the downloads.
Every page load fetched Roboto from Google Fonts and an unpinned @mdi/font@latest from
jsdelivr, both render blocking. An offline or firewalled deployment lost its icons, and
the e2e screenshots depended on two CDNs.
Allocating the 1024x1024x256 float volume texture fails with GL_OUT_OF_MEMORY on software
GL. The volume mapper then fails to compile its shader with an empty log and the context
is lost, which the spec never noticed. The spec covers the wasm heap, not rendering.
Mocha root hooks fail any test during which the page requested a non-local URL or logged
a shader compile failure, a lost context or a vtk setContext null access. The sample spec
and the two paint specs read the cached prostate archive. Console mirroring moves here so
it survives reloadSession.
A wait that carries its own time limit stands in for a state the app should publish, and
it is what fails on a slow runner. The 27 files that still have one are listed as debt, so
the list can only shrink and a new spec has to wait on page state.
The datasets came from three hosts. They are now assets of one GitHub release, so the only
host CI depends on for data is the one it already runs on. A release asset can be replaced,
so each file carries a sha256 that is checked on download and against the cache. A mismatch
aborts the run before any spec starts.
The labelmap direction spec wrote its config by hand next to a call to writeManifestToFile.
The interactor lifecycle spec subscribed to console entries that the root hooks already
subscribe every session to. A dataset served from /tmp is named by its url, so
openConfigAndDataset no longer repeats the names.
A cache saved by a pull request run is only visible to that pull request, and the e2e
workflow only runs on pull requests, so the first run of every PR downloaded all the
datasets. A job on main now saves the cache where every PR can restore it. The download
moves to a module that needs only node built-ins, so the job runs it with node and skips
installing dependencies.
@PaulHax
PaulHax merged commit 0296727 into Kitware:main Sep 21, 2026
8 checks passed
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