BT

InfoQ Homepage News Cypress 5.x Adds Test Retries and Shadow DOM Support

Cypress 5.x Adds Test Retries and Shadow DOM Support

Bookmarks

Cypress, a browser-based test runner and dashboard, recently introduced native support for test retries in the Cypress 5.0 release, helping developers avoid intermittent test failures. Other recent Cypress advances include networking stubbing and shadow DOM support.

As explained by Ben Hong, senior developer experience engineer at Cypress,

In the course of an end-to-end (E2E) test run, it is fairly common for tests to fail intermittently due to integration dependencies temporarily going offline, random network failures, race conditions, etc.. And just like how you would expect a user to refresh their browser if they got a 404 error, it seems like a waste to fail an entire test run due to a random outage.

The Cypress team provides a guide to migrating to version 5, including information to enable test retries, a change in the name for whitelisting cookies and blocking various hosts during tests, and other dependency updates including blobs, Node.js, and TypeScript.

Since the 5.0 release, Cypress 5.1 introduces experimental network stubbing support, and Cypress 5.2. adds shadow DOM support.

Cypress was originally only available for Chrome and Chromium-based browsers, though beta support is also available for Firefox.

Cypress' founders created it after frustration in working with testing tools like Selenium. While Selenium runs commands outside the browser and remotely over the network, Cypress executes commands in the same loop as a web application. Cypress is then backed by a Node.js process that communicates, synchronizes, and performs tasks.

Cypress supports end-to-end, integration, and unit tests. Cypress provides time travel testing, capturing snapshots as tests execute. Cypress also touts easy debuggability using browser-based developer tools. Other features of Cypress include automatic waiting, spies, stubs, clocks, network traffic control.

Cypress is open source software available under the MIT license. Contributions and feedback are encouraged via the TypeScript GitHub project and should follow the Cypress contribution guidelines and code of conduct. Beyond the test runner, Cypress optionally provides a commercial testing dashboard service.

Rate this Article

Adoption
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.

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

Community comments

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

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

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.