What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Cypress end-to-end test isolation is enabled by default. It gives each test a clean browser context, so the test can pass on its own as well as after other tests. Keep isolation enabled for most tests; use cy.session() to reuse login state, and disable isolation only for a deliberately scoped suite whose tests you have verified independently.
What Cypress test isolation resets
With end-to-end testIsolation: true, Cypress visits about:blank before each test and clears cookies, localStorage, and sessionStorage across all domains. It also resets Cypress test state, including aliases, clock mocks, intercepts, spies, stubs, and viewport changes. See Cypress’s test isolation documentation for the current behavior.
As an Amazon Associate I earn from qualifying purchases.
This is not a wipe of every browser storage mechanism. IndexedDB and other storage mechanisms are not cleared by test isolation. If your application relies on them, add explicit cleanup or deterministic setup so a test does not inherit data from earlier work.
Why independent tests matter
A test that passes only after another test has run has an implicit dependency: its result depends on execution order or leftover state. Such tests are harder to run selectively, reproduce, and debug. Cypress’s guidance is that tests should pass both independently and consecutively with other tests.
Isolation does not make a test reliable by itself. Each test still needs to establish the application state it requires and avoid depending on a previous test’s DOM, login, storage, or mocked behavior.
How to use the default isolation setting
Keep end-to-end isolation enabled by default
For most end-to-end suites, leave testIsolation enabled. Cypress enables it by default, and each test starts with a clean browser context. Write setup in the test or in reusable commands and hooks so the test can establish its own starting conditions.
Reuse authentication with cy.session()
When several tests need the same authenticated state, cy.session() can capture and restore cookies and local or session storage created during session setup. Put the session logic in a reusable login command or wrapper instead of repeating it across specs.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteWith isolation enabled, the page is cleared when the session is set up or restored. Visit the application after calling the session so the test has a page to work with. Session data is cleared before the session’s setup function regardless of the isolation setting.
Disable isolation only for a specific end-to-end suite when needed
If a particular suite must preserve the page or browser context between tests, Cypress allows testIsolation to be overridden at the describe/context level. Scoping the override limits its effect; disabling isolation broadly makes it easier for unrelated tests to become order-dependent.
With testIsolation: false, Cypress does not alter the browser context before each test, so page state, cookies, and storage may remain. Before relying on this, run each affected test by itself with .only() and confirm it still passes. Preserved state can reduce repeated setup, but it introduces a risk that one test silently prepares the next.
Rank #4
Isolation, session caching, and component tests compared
| Case | Page and DOM | Cookies and web storage | Setup and dependency trade-off |
|---|---|---|---|
End-to-end, testIsolation: true |
Visits about:blank before each test |
Clears cookies, localStorage, and sessionStorage across domains | Tests establish their own state; use cy.session() to restore login data, then visit the app |
End-to-end, testIsolation: false |
Does not reset the browser context before each test | Cookies and storage may persist | May reduce repeated setup, but tests can become order-dependent; verify each test alone |
End-to-end with cy.session() |
With isolation enabled, the page is cleared during session setup/restoration | Session restores cookies and local/session storage | Reusable authentication setup; visit the application after restoring the session |
| Component testing | Cypress unmounts the rendered component before each test | Clears cookies, localStorage, and sessionStorage | The configurable end-to-end testIsolation setting is not available for component tests |
IndexedDB and other browser storage are not cleared by the isolation behavior described above. Do not assume that a clean page and cleared web storage also mean every form of persisted browser data has been erased.
Migration note for Cypress 12
Cypress’s migration guide identifies Cypress 12 as the release that enforced a clean browser context for tests. If a suite was written to rely on the application page carrying over between tests, review that assumption: tests may need to revisit the app and rebuild browser state. The migration guidance describes the setting as testIsolation: true or false; treat this as Cypress 12 migration context, not a claim about every historical configuration detail. See the Cypress migration guide.
Best Value
Troubleshooting isolation-related failures
- A test fails alone but passes after another test: it likely relies on prior state. Add the needed setup to the test or a reusable hook/command instead of relying on execution order.
- A login disappears before the test: with isolation enabled, page state is cleared. Use
cy.session()for reusable authentication data and callcy.visit()afterward. - Data remains even though isolation is on: isolation does not clear IndexedDB or other storage mechanisms. Clean those explicitly or make setup deterministic.
- A test breaks after setting
testIsolation: false: state may be leaking between tests. Scope the override to the relevant suite and verify each test with.only(). - A component test appears to ignore
testIsolation: Cypress uses fixed reset behavior for component testing; the configurable end-to-end option does not apply there.
Performance and reliability trade-offs
Cypress says disabling isolation may improve end-to-end performance, but does not provide a quantified gain in the cited guidance. Treat any speed benefit as workload-dependent rather than guaranteed. Compare the cost of repeated setup with the debugging and maintenance cost of hidden state dependencies; preserve isolation unless a scoped exception is necessary and independently verified.
Or skip the browser setup
If you need a website screenshot rather than a Cypress test, ScreenshotNeo is a screenshot API and MCP server. Its one-call API request accepts a URL and returns an image or PDF. For example, using cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Free tools Windows power users keep installed
One-click scans. No signup required.
See the ScreenshotNeo API documentation for parameters. It accepts cookie/consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status. Its MCP server gives AI agents tools for screenshots, page information, and PDF capture. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000.
Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




