Cypress requires the following packages to be installed:
First, ensure you have Node.js and npm installed on your Ubuntu system.
Open a terminal and run the following commands:
sudo apt update
sudo apt install nodejs npm
This command installs Node.js and npm, the package manager for Node.js.
Note: Install the latest version of node.js
After installation, verify the versions to ensure everything is set up correctly:
node -v
npm -v
You should see the installed versions of Node.js and npm printed in the terminal.
Create a new directory for your project and navigate into it. Then, initialize a new Node.js project and install Cypress:
mkdir my-cypress-project
cd my-cypress-project
npm init -y
npm install cypress
This creates a new package.json
file and installs Cypress as a dependency.
To confirm that Cypress is installed correctly, run:
npx cypress verify
This command verifies the installation and ensures Cypress is ready to use.
Finally, open your Cypress directory in vs code editor and run the follwing command in that terminal.
npx cypress open
This command launches the Cypress Test Runner, where you can start creating and running tests.
With these steps, you should have Cypress installed and ready to use on your Ubuntu system.