Contents

    Guides

    Cypress Installation: How to Download and Start

    Published on

    February 19, 2026
    Cypress Installation: How to Download and Start

    Getting started with Cypress can feel confusing for first-time users—questions around downloading the tool, installing dependencies, and figuring out how to start Cypress are common.

    Small setup issues, like Node.js version conflicts or incorrect commands, can quickly slow down onboarding and block test automation progress.

    This guide walks through Cypress installation step by step, covering how to download Cypress, set it up correctly, and start Cypress for the first time.

    Prerequisites for Cypress Installation

    Before installing Cypress, make sure your system meets the basic requirements. Having these prerequisites in place helps avoid common installation and startup issues.

    System Requirements

    • Operating System: Cypress supports Windows, macOS, and Linux.
    • Node.js and npm: Cypress is installed via npm, so Node.js must be installed. Use a stable LTS version for best compatibility.

    Required Tools

    • Package manager (npm or yarn): Needed to download and manage the Cypress package.
    • Code editor: A modern editor like VS Code is recommended for writing and managing Cypress tests.

    Cypress Download Options

    Cypress can be downloaded and installed in multiple ways depending on how you want to manage dependencies and projects. Choosing the right option helps keep your setup clean and maintainable.

    Download Cypress Using npm (Recommended)

    • Install Cypress as a development dependency within your project
    • Ensures consistent Cypress versions across teams
    • Keeps Cypress tied to the project, not the system

    Commonly used command:

    • Install Cypress via your project’s package manager

    Local vs Global Installation

    When installing Cypress, you can choose between a local or global setup depending on your project needs and workflow preferences.

    1. Local installation (recommended)

    • Installed inside the project
    • Version-controlled and CI-friendly

    2. Global installation (not recommended)

    • Installed system-wide
    • Can cause version mismatches across projects

    Verifying the Cypress Download

    After installation, you can verify the Cypress download by:

    • Checking the Cypress version
    • Launching the Cypress Test Runner to confirm setup

    For most teams, installing Cypress locally via npm provides the most reliable and predictable setup.

    Cypress Installation Step by Step

    Follow these steps to complete a clean Cypress installation and ensure it runs correctly in your project.

    Step 1: Create (or Open) Your Project Folder

    Navigate to an existing project, or create a new one: Initialize a Node project if needed so you have a package.json.

    Step 2: Install Cypress

    Install Cypress as a dev dependency (recommended for team consistency): This downloads Cypress and adds it under devDependencies.

    Step 3: Verify Installation

    After Cypress is installed, verify it by checking:

    • Cypress is listed in package.json
    • Cypress binaries are downloaded properly
    • The Cypress version can be displayed via CLI

    Step 4: Open Cypress for the First Time

    Launch the Cypress Test Runner to initialize the default setup and complete the first-time configuration.

    Step 5: Confirm Cypress Project Files

    Once opened, Cypress will create key files/folders such as:

    • cypress/ (tests, fixtures, support)
    • cypress.config.js (configuration)

    Step 6: Run a Sample Test (Quick Validation)

    • Use the example specs (if added) or create a basic test file
    • Run it in the runner to confirm your setup is working end to end

    This step-by-step process ensures Cypress is installed correctly, initialized properly, and ready for writing and running tests.

    Understanding Cypress Project Structure After Installation

    After installing and starting Cypress, it automatically creates a default project structure. Understanding these folders and files helps you organize tests properly and maintain a scalable test suite.

    Key Cypress Folders

    • cypress/e2e: Contains end-to-end test files where your test cases are written.
    • cypress/fixtures: Stores static test data (JSON or other formats) used to mock or control test inputs.
    • cypress/support: Holds reusable logic such as custom commands and global configurations that run before tests.

    Important Configuration Files

    • cypress.config.js: Central configuration file for setting base URLs, retries, timeouts, and environment variables.
    • Package.json: Manages Cypress as a dependency and stores scripts for starting or running Cypress.

    Why This Structure Matters

    • Keeps tests organized and easy to maintain
    • Separates test logic, data, and configuration
    • Makes scaling Cypress tests easier as projects grow

    How to Start Cypress

    Once Cypress is installed, you can start it in a couple of different ways depending on whether you want an interactive UI or a terminal-based run.

    Start Cypress Using the Test Runner (Interactive Mode)

    This is the most common way to start Cypress when writing or debugging tests.

    1. Open a terminal in your project directory
    2. Start the Cypress Test Runner
    3. Select a browser
    4. Choose a spec file to run

    This mode shows:

    • Step-by-step command logs
    • DOM snapshots and time travel
    • Real-time test execution

    Start Cypress from npm Scripts (Optional)

    To simplify startup, you can define scripts in package.json:

    • Create a script to open Cypress
    • Run Cypress using a single command

    This is useful for teams and CI consistency.

    What Happens When Cypress Starts

    When Cypress starts for the first time, it:

    • Launches the Cypress UI
    • Detects available browsers
    • Loads your project configuration
    • Displays available test specs

    Starting Cypress in interactive mode is ideal for development, debugging, and learning how tests behave step by step.

    Starting Cypress in Headless Mode

    Headless mode runs Cypress tests without launching the interactive Test Runner UI. This mode is commonly used for CI pipelines, automated workflows, and faster execution.

    How to Start Cypress in Headless Mode

    • Open a terminal in your project directory
    • Run Cypress using the headless command
    • Cypress executes all specs and prints results to the terminal

    Headless mode runs tests using the Electron browser by default, but you can also specify other browsers.

    When to Use Headless Mode

    • Running tests in CI/CD pipelines
    • Executing large test suites quickly
    • Automating tests without manual interaction
    • Validating pull requests and builds

    What You Get in Headless Runs

    • Terminal logs showing test results and errors
    • Screenshots captured automatically on test failures
    • Videos recorded for each test run (configurable)

    Headed vs Headless Mode

    • Headed mode: Best for writing and debugging tests interactively
    • Headless mode: Best for speed, automation, and CI execution

    Starting Cypress in headless mode ensures consistent, repeatable test execution and is the preferred approach for automated testing workflows.

    Common Issues When Starting Cypress

    While Cypress installation is usually straightforward, some users may face issues when starting Cypress for the first time. Understanding these common problems helps troubleshoot faster and avoid setup delays.

    • Cypress does not open: This usually happens due to a corrupted or incomplete Cypress binary download. Reinstalling Cypress or clearing the cache often fixes the issue.
    • Node.js or npm version issues: Cypress may fail to start if an unsupported Node.js version is used. Switching to a stable LTS version ensures compatibility.
    • Permission or access errors: These occur when Cypress lacks access to required folders. Fixing directory permissions or running the terminal with proper access resolves it.
    • Missing or corrupted Cypress binary: Network interruptions during installation can prevent the binary from downloading correctly. Reinstalling Cypress forces a fresh download.
    • Browser not detected: Cypress may not find installed browsers if they are unsupported or improperly installed. Installing a supported browser usually resolves this.
    • CI or headless startup failures: Missing environment variables or display dependencies can cause failures in CI. Proper CI configuration and headless setup help prevent this.

    Best Practices for Cypress Installation and Startup

    The following best practices help ensure a smooth and reliable Cypress installation and startup process.

    • Install Cypress locally per project: Installing Cypress as a project dependency ensures consistent versions across team members and CI environments.
    • Use a stable Node.js LTS version: Cypress works best with supported LTS releases, reducing compatibility and startup issues.
    • Avoid global Cypress installations: Global installs can lead to version conflicts across projects and unpredictable behavior.
    • Verify installation before writing tests: Always start Cypress once after installation to confirm binaries, browsers, and configuration are working correctly.
    • Use npm scripts to start Cypress: Defining scripts simplifies startup commands and keeps workflows consistent across teams.
    • Keep Cypress versions locked: Pin the Cypress version in package.json to avoid breaking changes from unexpected upgrades.
    • Prepare for CI early: Configure headless execution and environment variables from the start to avoid CI-related issues later.

    Conclusion

    Installing and starting Cypress correctly is the foundation for building reliable and maintainable test automation. By following the right installation steps, understanding the project structure, and using recommended startup practices, teams can avoid common setup issues and get productive with Cypress faster.

    As test suites grow and move into CI pipelines, running Cypress consistently across different browsers and environments becomes increasingly important.

    Platforms like BrowserStack Automate help teams scale Cypress execution by running tests in parallel on real browsers and providing detailed logs and recordings, making it easier to maintain reliable automation without managing infrastructure.

    Try BrowserStack Now

    Data-rich bug reports loved by everyone

    Get visual proof, steps to reproduce and technical logs with one click

    Make bug reporting 50% faster and 100% less painful

    Rating LogosStars
    4.6
    |
    Category leader

    Liked the article? Spread the word

    Continue reading

    No items found.

    Put your knowledge to practice

    Try Bird on your next bug - you’ll love it

    “Game changer”

    Julie, Head of QA

    star-ratingstar-ratingstar-ratingstar-ratingstar-rating

    Overall rating: 4.7/5

    Try Bird later, from your desktop