This project offers a single shell script that quickly initializes a Cypress testing automation project from scratch.
Notes:
This script only works on Unix-based operating systems, such as Linux and OSX.
The script expects a
workspaces/directory at the same root where you run it, otherwise, it will fail. If you don't have it, create it before running the script:mkdir workspaces
-
Download the
cy.shfile and move it to your root directory -
In the root directory, run
./cy.sh name-of-the-project-you-want-to-createto create a Cypress project from scratch (you might have first to give execution permission to thecy.shfile) 2.1. Alternatively, you can run./cy.sh name-of-your-project-here x.x.x(wherex.x.xis the specific Cypress version you want to install). Otherwise, the latest version is installed. 2.2. Optionally, pass a third argument with your GitHub username to set the remote origin and README badge. If omitted, it defaults towlsf82.
Examples:
# Latest Cypress, default GitHub user (wlsf82)
./cy.sh my-repo
# Specific Cypress version, default GitHub user (wlsf82)
./cy.sh my-repo 15.8.1
# Latest Cypress with a custom GitHub user (leave version empty)
./cy.sh my-repo "" my-gh-user
# Specific Cypress version and custom GitHub user
./cy.sh my-repo 15.8.1 my-gh-user- After the script is executed, access the newly created project and start working on it.
To understand exactly what it does, read the comments in the cy.sh file.
If you liked this project, consider leaving a ⭐.
Created with 🖤 by Walmyr.