Prerequisites
Before setting up Cypress, ensure you have the following installed on your system:
Node.js
Required for running Cypress tests.
Installing Node.js
-
Download Node.js
- Visit the official Node.js website: https://nodejs.org/
- Download the LTS (Long-Term Support) version for better stability.
-
Install Node.js
- Run the installer and follow the installation steps.
- Ensure you check the option Automatically install the necessary tools.
-
Verify Installation
- Open a terminal or command prompt and run the following commands to confirm installation:
terminal
node -v npm -v
- These should return the installed versions of Node.js and npm.
- Open a terminal or command prompt and run the following commands to confirm installation:
Git
Required for cloning and managing the Cypress test repository.
Installing Git
-
Download Git
- Visit the official Git website: https://git-scm.com/downloads
- Download the version appropriate for your operating system (Windows, macOS, or Linux).
-
Install Git
- Run the installer and follow the setup instructions.
-
Verify Installation
- After installation, open a terminal or command prompt and run:
terminal
git --version
- After installation, open a terminal or command prompt and run:
Visual Studio Code
Recommended code editor for managing test scripts.
Installing Visual Studio Code
-
Download VS Code
- Visit the official Visual Studio Code website: https://code.visualstudio.com/
- Download the installer for your operating system (Windows, macOS, or Linux).
-
Install VS Code
- Run the installer and follow the setup instructions.
- During installation, check the option to Add to PATH for command-line usage.
-
Install Essential Extensions (Optional but recommended)
- Open VS Code and go to the Extensions Marketplace (Ctrl + Shift + X or Cmd + Shift + X on macOS).
- Search for and install the following extensions:
- Prettier (for automatic code formatting)
- Cypress Snippets (for easier Cypress test writing)
Browser Requirements
Any modern browser (Optional): Chrome, Edge, or Firefox for executing tests.
Last updated on