Skip to content

feat(test-runner): add httpCache config option#41687

Open
pavelfeldman wants to merge 1 commit into
microsoft:mainfrom
pavelfeldman:http-cache-proxy
Open

feat(test-runner): add httpCache config option#41687
pavelfeldman wants to merge 1 commit into
microsoft:mainfrom
pavelfeldman:http-cache-proxy

Conversation

@pavelfeldman

@pavelfeldman pavelfeldman commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds a top-level httpCache: { dir, match } test config option. When set, the runner starts a single caching MITM proxy and routes every browser through it: matching responses are recorded to dir on the first run and replayed from disk on later runs.
  • One proxy owns the cache for the whole run, so all workers share it and concurrent identical misses coalesce into one upstream fetch. match (glob/RegExp) selects which request URLs are cached; https is intercepted with a self-signed cert.

Fixes: #22865

Records browser responses to disk and replays them on later runs. When
`httpCache: { dir, match }` is set, the runner starts a single caching
MITM proxy and routes all browsers through it. GET/2xx responses are
stored verbatim (raw bytes + headers) and matched by an optional URL
glob/regex; https is intercepted with a self-signed cert. One proxy owns
the cache for the whole run, so all workers share it and concurrent
identical misses coalesce into one upstream fetch.
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

7709 passed, 1235 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

4 flaky ⚠️ [chromium-library] › library/video.spec.ts:680 › screencast › should capture full viewport on hidpi `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/inspector/recorder-api.spec.ts:120 › should type `@chromium-ubuntu-22.04-node20`
⚠️ [playwright-test] › ui-mode-test-output.spec.ts:118 › should collapse repeated console messages for test `@windows-latest-node22`
⚠️ [playwright-test] › ui-mode-test-output.spec.ts:118 › should collapse repeated console messages for test `@ubuntu-latest-node22`

49536 passed, 1164 skipped


Merge workflow run.

@Skn0tt Skn0tt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not seeing typical caching headers like Vary or Accept-Encoding be mentioned, which seems fishy. Am I misunderstanding something?

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.

[Feature]is it possible to reuse static resouces cache of previous test run ?

2 participants