playwright
playwright copied to clipboard
[Feature]is it possible to reuse static resouces cache of previous test run ?
Test Case 1 : new context() page.goto("https://example.com");
Test Case 2 new context() page.goto("https://example.com");
I want to reuse all the static resource cache from Test Case 1 in Test Case 2, so that this test case will not download the resources anymore, it will be very useful when it accesses some websites with large file resources
In Isolation mode, Is there a way to achieve it? PS: Just want to reuse the static resources not cookies or storage.
We don't share the disk cache between the isolated contexts. Leaving this open to collect more upvotes.
@pavelfeldman Hi, is there another way to achieve it and reuse the disk cache?
Not at this point. Using caching HTTP proxy would solve it, but I get how it is somewhat hard to set up.
This would be an useful feature to have and I've been asked about reducing the number of calls on our test server which we are running our test against, 600+ test cases all requesting the same resource over and over again. mocking and interception is used in some cases but majority of the time pages require script bundles to work properly, reusing them would be fantastic.
This would be an useful feature to have and I've been asked about reducing the number of calls on our test server which we are running our test against, 600+ test cases all requesting the same resource over and over again. mocking and interception is used in some cases but majority of the time pages require script bundles to work properly, reusing them would be fantastic.
Agree
Disk/memory resource caching can speed up tests quite a bit — and this is especially true for VR tests where page load might often be the most time-consuming task.
@pavelfeldman I can share some stats on how much of a difference this can make with a large internal test suite. Could you please point me to how and where I can go about (temporarily) make this change — in case it doesn't need a large overhaul of things.
should be good to implement it. why waste network resources to redownload something you have in other context.