Cypress Fundamentals
Cypress is an open-source JavaScript test runner for web applications. It drives a real browser to exercise end-to-end journeys, mount individual UI components, and send direct HTTP checks, so you verify behavior the way users and browsers actually experience it.
itSoftware engineering | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic — Cypress Fundamentals
Cypress is the test runner that sits in the browser with your app and clicks around like a slightly obsessive colleague who never gets bored of the login form. A Node process tags along for the unglamorous work: binaries, screenshots, videos, talking to disks and databases. That split is the whole architecture. Everything else is detail hanging off it.
Before tools like this, teams drove browsers from the outside through remote protocols and then wondered why the test could not see what the page could see. Cypress flipped the default: your commands enqueue in the same run loop as the application. They look like ordinary method calls. They are not. They line up on a queue, yield subjects to each other, and mostly refuse to run at the moment you wrote them.
Three ideas carry the rest of the course. First, queries and assertions retry; actions wait until they are allowed, then fire once. That is why cy.wait(5000) is the villain of so many suites and why a green mid-chain .should() can still strand you on a detached DOM node after a re-render. Second, the network is a first-class control surface: cy.intercept to stub or spy, cy.request to seed state without performing interpretive dance through every form, cy.session so you stop logging in like it is a personality trait. Third, one project can hold end-to-end visits, component mounts, HTTP checks, and accessibility scans, but a passing mount does not mean checkout works. Different risks, different entry commands.
The surprise for many newcomers is the list of things Cypress will not pretend to be. It will not drive two browsers at once for your chat app fantasy. It will not let browser test code quietly import your server's database module. It is not a crawler, a load generator, or a hobby kit for automating someone else's website. Hover is awkward. WebSockets are awkward. Electron as the default CI browser is on the way out, so pin a real Chrome before the future arrives politely.
If you want the map, read the Intro and keep the Cheatsheet open while you write specs. If you want the fingers-on version, use the Practice Reference and the smoke Exercise. If you want the scars other teams already paid for, open Field Notes and learn why fixed waits and post-click chaining keep showing up in incident writeups. Then follow Reference into the official docs for the exact API you are about to argue with.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://docs.cypress.io/app/get-started/why-cypress
Supports
- In-browser architecture with companion Node process
- Native access to window, document, and application objects
- cy.session and cy.origin shortcuts described in product framing
- End-to-end, component, and related testing positioning
- https://docs.cypress.io/app/core-concepts/introduction-to-cypress
Supports
- Command chains, subjects, and asynchronous enqueueing
- Assertions via .should and .and
- Distinction between Cypress commands and immediate Cypress.* APIs
- https://docs.cypress.io/app/core-concepts/retry-ability
Supports
- Queries versus actions versus assertions and retry rules
- defaultCommandTimeout default of 4 seconds
- Mid-chain assertions as retry boundaries and detached DOM failures
- Guidance to end chains after actions and re-query
- https://docs.cypress.io/app/references/trade-offs
Supports
- Permanent limits: not general automation, one browser, JS in browser
- Backend access via cy.task and cy.request
- Collaboration patterns without a second Cypress browser
- WebSocket interception limits
- https://docs.cypress.io/app/core-concepts/testing-types
Supports
- E2E, component, API, and accessibility testing comparison
- cy.visit, cy.mount, cy.request entry points
- Component tests not proving full-app integration
- https://docs.cypress.io/app/core-concepts/best-practices
Supports
- Selector guidance favoring data-* hooks over brittle CSS
- Avoiding unnecessary fixed waits
- Network and alias synchronization practices
- https://docs.cypress.io/app/get-started/install-cypress
Supports
- npm install cypress --save-dev and cypress open/run
- Binary postinstall and package-manager allowlist needs
- Supported OS, Node, browsers
- Electron deprecated as a test browser
- https://docs.cypress.io/app/core-concepts/writing-and-organizing-tests
Supports
- Spec organization, hooks, and configuration structure
- https://docs.cypress.io/api/commands/intercept
Supports
- cy.intercept stubbing, spying, and alias waits
- Coverage of XHR, fetch, and related HTTP traffic
- https://docs.cypress.io/api/commands/session
Supports
- Caching and restoring cookies and web storage
- Session setup patterns for reused auth state
- https://docs.cypress.io/app/component-testing/get-started
Supports
- Component testing in a real browser via cy.mount
- Official framework mounting libraries and setup wizard
- https://docs.cypress.io/api/table-of-contents
Supports
- Command classification into query, assertion, action, other
- https://www.cypress.io/cloud
Supports
- Cloud parallelization, flake detection, Test Replay, CI analytics
- Landscape and timeline claims about hosted recording features
- https://www.cypress.io/about-us/our-story
Supports
- Commercial launch context in 2018
- Origin story relative to Selenium-style automation
- https://www.cypress.io/blog/2017/10/10/cypress-is-now-public-beta
Supports
- First commit date 5 June 2014
- Public beta / open-source announcement
- https://www.cypress.io/releases/1-0-0
Supports
- Cypress 1.0.0 released 8 October 2017 as public beta
- https://www.cypress.io/releases/6-0-0
Supports
- cy.intercept GA and cy.route/cy.server deprecation in 6.0.0
- Release date 22 November 2020
- https://www.cypress.io/blog/2020/11/24/introducing-cy-intercept-next-generation-network-stubbing-in-cypress-6-0
Supports
- cy.intercept as successor to cy.route with fetch and navigation support
- https://www.cypress.io/releases/10-0-0
Supports
- Cypress 10 component testing beta and App redesign
- Release date 31 May 2022
- https://www.cypress.io/blog/cypress-10-release
Supports
- Component testing integrated into the main App launcher
- https://www.cypress.io/releases/11-0-0
Supports
- Component testing GA on 7 November 2022 for major frameworks
- https://www.cypress.io/blog/announcing-cypress-11
Supports
- Component testing promoted from beta to GA
- https://www.cypress.io/releases/12-0-0
Supports
- cy.session and cy.origin GA and testIsolation defaults
- Release date 5 December 2022
- https://medium.com/vestiaire-connected/optimizing-e2e-test-suites-for-reliable-monolith-deployments-at-vestiaire-collective-7c12433c4add
Supports
- Field Notes spine claim on static cy.wait cost and flake
- Replacement with assertions and cy.intercept dynamic waits
- https://github.com/brunopulis/awesome-cypress
Supports
- Discovery source for ecosystem tools curated into Awesome Links
- https://github.com/cypress-io/cypress-example-recipes
Supports
- Official recipes link rationale and awesome-links entry
- https://github.com/cypress-io/cypress-docker-images
Supports
- Official CI images for Linux browser dependencies
- https://github.com/agoldis/sorry-cypress
Supports
- Open-source dashboard alternative placement
- https://deploysentinel.com/
Supports
- CI debugging product placement for Cypress failures
- https://playwright.dev/
Supports
- Landscape alternative architecture comparison
- https://www.selenium.dev/
Supports
- Landscape WebDriver alternative comparison
- https://webdriver.io/
Supports
- Landscape JS WebDriver runner comparison
- https://testcafe.io/
Supports
- Landscape alternative JS browser runner comparison
- https://www.browserstack.com/automate
Supports
- Hosted browser grid placement for Cypress CI
- https://saucelabs.com/products/platform-for-test
Supports
- Hosted execution platform placement
- https://docs.percy.io/docs/cypress
Supports
- Visual testing add-on for Cypress
- https://applitools.com/tutorials/cypress.html
Supports
- Applitools Eyes Cypress integration
- https://github.com/component-driven/cypress-axe
Supports
- axe accessibility scans inside Cypress tests
- https://github.com/NoriSte/cypress-wait-until
Supports
- Custom predicate waiting plugin
- https://github.com/Shelex/cypress-allure-plugin
Supports
- Allure reporter plugin
- https://github.com/LironEr/cypress-mochawesome-reporter
Supports
- Mochawesome HTML reporter plugin
- https://github.com/archfz/cypress-terminal-report
Supports
- Terminal command-log reporter for CI
- https://github.com/bahmutov/cypress-failed-log
Supports
- Failed-test log capture plugin
