News for hackers. Stuff that matters.

jasonmit

Re:Polly.js – Record, replay, and stub HTTP interactions on Thursday June 14, 2018 @12:40AM (#17309337)
See my comment above. This is not a replacement for E2E testing.
Re:Polly.js – Record, replay, and stub HTTP interactions on Thursday June 14, 2018 @12:37AM (#17309315)
Can you share which libraries you know that achieve the same thing? I'm happy to go through and respond to the differences.
Re:Polly.js – Record, replay, and stub HTTP interactions on Thursday June 14, 2018 @12:30AM (#17309283)
Polly records as well as exposes a stubbing API. So it's quite different from what I've seen of the others.
Re:Polly.js – Record, replay, and stub HTTP interactions on Thursday June 14, 2018 @12:22AM (#17309259)
> you have to do a manual recording to create them the first time (which means manually setting up test data in production that is just-right for your test case)

Your test invokes the the recorder. There isn't anything manual outside of writing & running your test.

> you have to manually re-record when they fail

Again, nothing manual. It would require running your test again with Polly in record mode if you want to "refresh" the recording with a newer set of responses.

> In both cases, you've accepted that you can't easily setup specific, isolated test data in your upstream system, and are really just doing "slightly faster manual testing".

This is by no means a replacement to E2E testing. It is a form of acceptance/integration testing where you're testing your application against a point in time that you verified all systems were talking correctly with your application. E2E tests are much slower, difficult to debug, and intended to capture those breakages in contracts.

It's a tool for your toolbox, reach for it when needed. We plan to release a tutorial/talk to should clear up any misconceptions. There are also other applications for Polly such as building features offline or giving a demo using faker to easily hide any confidential data.