BT

Netflix Announces Polly.JS HTTP Interaction Library

| by Dylan Schiemann Follow 7 Followers on Jul 20, 2018. Estimated reading time: 1 minute |

Netflix recently announced the release of Polly.JS, an open source library for recording, replaying and stubbing HTTP interactions.

Polly leverages native browser APIs to mock requests and responses with minimal configuration, providing developers with a mechanism to manage HTTP requests.

The Netflix team found that keeping fixtures and factories in parity with APIs is challenging, which led to the creation of Polly. Polly records and maintains server responses in a flexible manner. For example, it is possible to record and replay HTTP interactions during test runs to verify application accuracy, as well as capturing requests and responses to simulate changes to application state.

Polly supports both Fetch and XHR requests and provides test helpers for Mocha and QUnit test helpers. Developers may intercept, modify, and attach events, as well as apply changes to accelerate or decelerate request response times.

Recording of HTTP interactions with Polly may be saved to disk or local storage within a browser in HTTP Archive (HAR) format.

Browser support is currently for Evergreen browsers (most recent releases of major browsers). Support for Internet Explorer 11 is under active development based on community feedback.

The Polly team is also working to make the library work in an isomorphic manner to support other testing frameworks, such as Jest and Intern. Testing is currently limited to work within web browsers.

Polly.JS is available under the Apache 2 license. Contributions are encouraged via GitHub. Prospective contributors are encouraged to read the contributing guidelines.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT