What’s New

Cypress Test Runner 6.1.0

Released 12.7.2020

What's New

Get more control of scrollBehavior.

This release introduces a new scrollBehavior configuration option that allows you to control the viewport position when an element is scrolled prior to action commands including disabling scrolling altogether.

As always, several bug fixes were made including a few bugs with the new cy.intercept API for network stubbing. View the full list including deprecations and dependency updates in the 6.1.0 changelog.

New from the Cypress Team

Retry, Rerun, Repeat - Software and hardware failures are normal and expected. As such, the ability to 'retry' is common place. In this blog post, Gleb Bahmutov dives into three types of retries built into Cypress and around it.

Cypress Timings - Use Gleb's cypress-timings plugin to see the individual command timings and get better insight into where the test is slow.

Debug Element Visibility problems in Cypress - Gleb dives into how to step through the visibility code to determine why Cypress thinks an element is invisible during the tests.

New from the Cypress Community

[Filip Hric] Migrating .route() to .intercep() in Cypress

Cypress Test Runner 6.0.0

Released 11.23.2020

What's New

Introducing Next Gen Network Stubbing with cy.intercept

Cypress now offers next generation network stubbing support with the introduction of the cy.intercept API (previously cy.route2()). With cy.intercept you'll have out-of-the-box support for intercepting fetch calls, page loads, and resource loads in addition to the pre-existing support for XMLHttpRequests (XHR).

Cypress 6.0.0 introduces breaking changes. We put together a detailed Cypress 6.0.0 Migration Guide for a full run down on how to update your code to support Cypress 6.0.0.

See the full changelog for Cypress 6.0.0.

New from The Cypress Team

When Can the Test Submit a Form? - The most recent post in our series exploring flaky tests and how to fix them.

Testing an Application in Offline Network Mode - Learn how Cypress can simulate an offline network status during a test.

[Webcast recording] Using Code Smells to Fix Flaky Tests in Cypress

New from The Cypress Community

[Luis Aviles] Testing Web Components with Cypress and TypeScript - A helpful deep-dive on how to add E2E testing capability with Cypress and TypeScript.

[Lukas Klement] Implementing Code Coverage with Angular and Cypress - A step-by-step tutorial in implementing code coverage for your Angular + Cypress application.

Cypress Test Runner 5.6.0

Released 11.9.2020

What's New

You can now run all integration specs or all component specs separately (or a filtered list of specs) by clicking the appropriate button in the Test Runner in the Tests tab. .

You can now dynamically add aliases for requests intercepted via cy.route2(). Check out an example.

As always bug fixes were made including fixing an issue causing failed subresource integrity checks for external scripts. View the full list of all changes, in the 5.6.0 changelog.

New from the Cypress Team

[Webcast recording] How Userlane dramatically reduced flaky E2E tests withy Cypress. Watch the replay >

[changelog.com] The testing pyramid should look more like a crab (Gleb Bahmutov).

New from the Cypress Community

[Engineers @ Optimizely] How Optimizely use Cypress to automate testing within it's AppExchange App in Salesforce.

[Filip Hric] Using Destructuring in Cypress.

[Filip Hric] Test Grepping in Cypress Using Module API.

[Thota Mahesh] API Testing with Cypress.

Cypress Test Runner 5.5.0

Released 10.26.2020

What's New

.type() now fires the beforeInput event during typing (although do note that Firefox does not support the beforeinput event).

As always, bug fixes were made, and there were some dependency updates as well. View the full list in the 5.5.0 changelog.

Flaky Test Detection & Alerts: New for Cypress Dashboard

Released 10.19.2020

What's New

Today we're excited to announce flaky test detection, the next step in our mission to continuously enhance Cypress's ability to handle flake.

For Cypress Dashboard users who have enabled test retries, the Cypress Dashboard will now automatically identify and annotate tests with flaky behavior while also surfacing your top flaky tests.

With Flaky Test Alerts, you can activate notifications in Slack and push warnings to Github when test cases are detected as flaky, making it easier than ever to manage flaky test behavior before it becomes an issue in your test suite. Learn more >

Not using Cypress Dashboard yet? The Cypress Dashboard adds a layer of timely, simple and powerful insights to all your test runs in a single, easy-to-use Dashboard. Test and debug faster with The Cypress Dashboard. Get started for free.

Cypress Test Runner v5.4.0

Released 10.12.2020

What's New

Turn off the Command Log in the Test Runner when debugging performance issues. The Command Log can be hidden by passing the CYPRESS_NO_COMMAND_LOG=1 environmental variable during cypress open or cypress run to be used as a tool to debug performance issues.

As always, bug fixes and improvements were made. View the full list in the 5.4.0 changelog.

New from the Cypress Team

Debug a Flaky Visual Regression Test by Gleb Bahmutov [@bahmutov]

New from the Cypress Community

Angular Meetup Recording: Watch Mayra A. Rodriguez [@mayrascript] talk about E2E testing with Cypress and Nx.

Identifying Code Smells in Cypress by Josh Justice [@codingitwrong]

Cypress Test Runner v5.3.0

Released 9.28.2020

What’s New

Firefox support is out of beta! Firefox 80 and newer are officially stable when used with Cypress. The firefoxGcInterval workaround is no longer needed unless testing versions of Firefox older than 80.

As always, bug fixes and improvements were made, including a few fixes to experimental network stubbing. View the full list in the 5.3.0 changelog.

New from Team Cypress

Webcast Recording: How GoFundMe's QA Engineers and Developers Test 30x Faster with Cypress. Watch the replay>

Cypress-book: a simple and effective way to write a continuously-updated web app tutorial using Markdown and Cypress tests. Check it out>

Cypress Test Runner v5.2.0

Released 9.15.2020

New Features:

Support for shadow DOM is no longer experimental (which also means that we've removed the experimentalShadowDomSupport configuration flag). Now, by using the configuration option includeShadowDOM to enable shadow DOM, you'll be able to query globally, per-suite, per-test, or programmatically.

Ensure redirects are followed with experimental network stubbing. We recently introduced experimental network stubbing via cy.route2(). Now, we've added a followRedirect option that will ensure redirects are followed before resolving the req.reply callback. Additionally, we've added the capability to specify delayMs and throttleKbps when stubbing static responses.

As always, bug fixes and improvements were made and you can see the full list in the 5.2.0 changelog.

However, if you happened to experience the issue with test retries that caused Cypress to hang in run mode with certain assertions, that has been fixed.

And if you experienced a performance issue which led to CPU bottlenecking during Cypress runs, that too has now been fixed.

For a full list of 5.2.0 changes visit the changelog >

New from the Cypress Team

New from the Cypress Community

  • Cypress Ambassador Marie Drake [@mcruzdrake] will be speaking at the upcoming Open Quality Conference about Web Accessibility and how Cypress helps bridge the gap between developers on testers. Learn more >

Cypress Test Runner v5.1.0

Released 9.1.2020

What's New

Introducing experimental full network stubbing support. When experimentalNetworkStubbing is enabled, the cy.route2 command is available. By using cy.route2(), your tests can intercept, modify, and wait on any type of HTTP request originating from your app, including XMLHttpRequests, fetch requests, beacons and subresources (like iframes and scripts).

Outgoing HTTP requests can be modified before reaching the destination server, and the HTTP response can be intercepted as well before it reaches the browser.

Check out the cy.route2() docs for more info on how to enable this experiment >

Get specific with your event triggers. cy.trigger() now accepts an eventConstructor option in case you want to specify the type of event that you want to trigger (e.g. MouseEvent or KeyboardEvent).

For example - cy.get('button').trigger('mouseover', { eventConstructor: 'MouseEvent' })

We also fixed several bugs and made a small handful of dependency updates. See the full changelog for 5.1.0 >

New from the Cypress Community

Cypress Test Runner v5.0.0

Released 8.18.2020

New Features

Cypress 5.0 has native support for test retries. Test retries are off by default. However, they can be configured using the new retries configuration option which allows you to set the number of times to retry a failing test.

We’ve improved clicking with modifiers. Now, .click(), .dblclick(), and .rightclick() accept options altKey, ctrlKey, metaKey, and shiftKey to hold down key combinations while clicking.

We now allow you to disable DOM snapshots for stubs and spies. You can chain .snapshot() off of cy.stub() and cy.spy() to disable snapshots during those commands. For example: cy.stub().snapshot(false).

Breaking Changes

Ready to upgrade? Cypress 5.0 contains some breaking changes. We put together a detailed Cypress 5.0 Migration Guide for a full breakdown on how to update your code to support 5.0.

Here are some of the breaking changes to be aware of:

We’ve renamed Cypress.Cookies.defaults() whitelist to preserve to better reflect its behavior. We also renamed the blacklistHosts configuration to blockHosts and cy.server() whitelist option to ignore for the same reason.

Because Cypress 5.0 has test retries built in natively (although they are disabled by default), we have deprecated the cypress-plugin-retries plugin. You will see an error message if you have the plugin still installed after upgrading to Cypress 5.0.

We made adding the sameSite property to objects yielded by cy.setCookie(), cy.getCookie(), and cy.getCookies() the default. As a result, the experimentalGetCookiesSameSite configuration has been removed.

If you have file paths with a question mark ? in them, Cypress no longer supports those.

Libgbm-dev is now a requirement to run Cypress on Linux.

Cypress now requires TypeScript 3.4+

Installing Cypress on your system now requires node.js 10+

Several bug fixes and improvements were made as well. See the full changelog for 5.0.0 >

New from the Cypress Team

New from the Cypress Community

Test Analytics: New for the Cypress Dashboard

Released 8.11.2020

Test Analytics for the Cypress Dashboard is a huge step forward in our mission to help teams easily manage and improve their test suites, so developers can build better things with confidence.

With today’s release of Test Analytics, Cypress Dashboard users will notice four major new features: top failures, slowest tests, test case history, and project analytics like run status, run duration and more. 

Dashboard users can now find the troublemakers in their test suite, manage issues with ease, and unlock a deeper, unprecedented understanding of their tests. Read more>

Not using Cypress Dashboard yet? The Cypress Dashboard adds a layer of timely, simple and powerful insights to all your test runs in a single, easy-to-use Dashboard. Test and debug faster with The Cypress Dashboard. Get started for free.

Cypress Test Runner v4.12.0

Released 8.3.2020

New Features

  • You can now control whether screenshots are automatically taken on test failure during  cypress run by setting screenshotOnRunFailure in your configuration.
  • The pluginsFile now has access to a readonly version property within the config object that returns the current Cypress version being run. This will allow plugins to better target specific Cypress versions.
  • During cypress open, you can now run a subset of all specs by entering a text search filter and clicking ‘Run n tests’.

New from the Cypress Team

  • Bug fixes and improvements

    • position: fixed elements that have a parent with pointer-events: none will now correctly evaluate as visible. 
    • Applications using custom elements will no longer trigger infinite XHR request loops. 
    • When snapshotting the DOM, Cypress no longer causes attributeChangedCallback to be triggered on custom elements.
    • Spec files containing + characters now properly run in Cypress. 
    • When using the fx shortcut in cy.route(), an error is now thrown when the fixture file cannot be found. 
    • Cypress no longer thrown Cannot read property '__error' of null error when passing a file containing null content to cy.fixture()
    • Values containing exponential operators passed to --env via the command line are now properly read. 
    • The “Open in IDE” button no longer disappears from hooks when the tests are manually rerun. 
    • When experimentalSourceRewriting is enabled, AST rewriting will no longer return an output before the body is done being written. This would happen when the response body was too large and the response would be sent while the body was still being modified. 
    • When using .type(), Cypress now properly types into an input within an iframe that auto focuses the input.

Cypress Test Runner v4.11.0

Released 7.21.2020

What's New

Better time traveling with improvements to cy.clock(). If you've ever used cy.clock() to control the time of the world within your app, you know that historically you needed to provide an epoch time number (and you may have tried to pass a Date object and realized that we would just ignore it). But now, you can provide either a Date object or an epoch time number AND we won't just ignore it, we’ll convert it to the Number and it’ll work just fine.

Do or don’t ensureScrollability. We also made it so that you can now pass an ensureScrollability: false option to .scrollTo() to skip checking whether the element is scrollable.

We also fixed several bugs and made several (specifically 10) dependency updates. See the full changelog for 4.11.0 >

Cypress Test Runner v4.10.0

Released 7.6.2020

What’s New

Edit tests more easily with the Open in IDE button. Now, when hovering over a test in the Test Runner you’ll see the 'Open in IDE' link. Clicking it will open the spec in your code editor so you can edit your tests more easily.

Get better insight into the hooks running around your tests. If you’re using the before, beforeEach, after, and afterEach hook definitions to set conditions that you want to run before or after a set of tests (or before or after each test), those will now display separately in the Test Runner’s Command Log if they are defined in separate hook definitions.

And, if you need to open or edit those specs in your IDE you’ll see that ‘Open in IDE’ link when hovering, and you can click to open that spec file directly.

We also fixed several bugs and made some minor UI improvements to the Test Runner. See the full changelog for 4.10.0 >

New from the Cypress Team

New from the Cypress Community

Cypress Real World App

Released 6.10.2020

The Cypress Real World App (RWA) is now available as an open-sourced project on Github. The RWA is a sample payment application that we have often used for demonstrating real world usage of Cypress testing methods, patterns, best practices and workflows.

Now anyone can use the Cypress Real World App to learn, experiment, tinker, train and practice testing with Cypress. Learn more >

Slack Integration: New for the Cypress Dashboard

Released 6.9.2020

Our new Slack app is live! Now, when you connect your Cypress organization with your Slack instance in the Cypress Dashboard, you’ll see run results for all projects in your org posted to the Slack channel of your choice. 

Not sure what the Cypress Dashboard is? The Cypress Dashboard is available to anyone running tests with Cypress. It adds a layer of timely, simple and powerful insights to all your test runs in a single, easy-to-use Dashboard. Test and debug faster with The Cypress Dashboard. Get started for free.