Live data from Hacker News

Polly.js – Record, replay, and stub HTTP interactions

netflix.github.io

21–30 of 91 posts

Re: Polly.js – Record, replay, and stub HTTP interactions

#22
post #20

Related to that, is there anything that allows to completely save the state of a modern website with all of the fetch requests and websocket related stuff it fired off? I just want an ability to save and reopen exactly what I'm looking at. There are some cool websites which will eventually go down and I want to preserve an interactive snapshot of them.

It seems like you're describing a single page web app. I don't think anyone could answer this without knowing more about what you mean and what you would want to accomplish. Sounds neat, though.

Re: Polly.js – Record, replay, and stub HTTP interactions

#25
post #20

Related to that, is there anything that allows to completely save the state of a modern website with all of the fetch requests and websocket related stuff it fired off? I just want an ability to save and reopen exactly what I'm looking at. There are some cool websites which will eventually go down and I want to preserve an interactive snapshot of them.

This won't work for WebSockets, really websites that use WebSockets require some interaction to generate the transmitted message which is often dependent on the servers response. Private websites, or websites that require a login are hard - but it can be done. Would suggest HTTrack.

Re: Polly.js – Record, replay, and stub HTTP interactions

#27

Unrelated but There are so many things called Polly that it gets confusing

Yeah. I was going to bring up the library for .net that provides policy based retries.

i went to the slackbot that has a cute parrot logo. we at CodingBlocks love our Polly.

Re: Polly.js – Record, replay, and stub HTTP interactions

#28
post #21
post #16

Earlier quoted context omitted.

This isn't selenium. More like wiremock.

What's the core distinction between this/wiremock vs selenium?

Selenium is for behavior testing. Simulating clicks and form filling. This is for mocking http endpoints.

Re: Polly.js – Record, replay, and stub HTTP interactions

#30
post #20

Related to that, is there anything that allows to completely save the state of a modern website with all of the fetch requests and websocket related stuff it fired off? I just want an ability to save and reopen exactly what I'm looking at. There are some cool websites which will eventually go down and I want to preserve an interactive snapshot of them.

I haven't used it so I'm not sure that it does everything you want, but take a look at https://webrecorder.io/
Post reply on HN