Skip to Content

⚙️ Installation & Setup: Product Development Team

Follow these steps to set up Cypress and clone the repository:

1. Create a Project Folder 📂

  • Choose any directory where you want to store the project
  • Create a new folder (e.g., CypressTestingProject)

2. Open the Folder in Visual Studio Code 🖥️

  • Launch Visual Studio Code
  • Click FileOpen Folder → Select the folder you created

cypress

3. Open the Terminal in VS Code 💻

  • At the top menu, click TerminalNew Terminal

cypress

  • A terminal window will appear at the bottom of VS Code

cypress

4. Ensure You’re in the Correct Directory 📍

  • The terminal should display the path of the folder you opened

cypress

5. Clone the Repository 📂

  • Instead of writing test cases from scratch, clone the prepared Cypress test repository
  • ⚠️ Reminder: When pasting in the terminal, DO NOT use Ctrl + V. Instead, right-click on the terminal, and it will automatically paste the copied command
  • Clone the repository using (Copy + Paste into the terminal):
terminal
git clone https://oauth2:[email protected]/ai-product-dev/cypress-general-automation.git
  • Navigate into the cloned directory:
terminal
cd cypress-general-automation

6. Install Cypress 📦

  • Run the following command to install Cypress as a development dependency:
terminal
npm install cypress --save-dev

7. Opening Cypress 🚀

  • After installation, open Cypress with:
terminal
npx cypress open
  • This command launches the Cypress Test Runner and automatically creates a cypress folder in your project directory

8. Project Structure 📁

  • Inside the cypress folder, you will find:
  • fixtures/: Contains test data
  • integration/: Stores test scripts
  • support/: Reusable functions and utilities

⚠️ Fixing “Running scripts is disabled on this system” Error

If you encounter an error message saying: error cannot be loaded because running scripts is disabled on this system

You need to allow scripts to run by updating the execution policy.

🔹 Solution:

  1. Open PowerShell as Administrator cypress cypress

  2. Run the following command in the PowerShell terminal:

terminal
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
  1. When prompted, type Y (Yes) and press Enter (If not prompted, skip)

  2. To make sure it has been assigned, run the following command, it should return as RemoteSigned:

terminal
Get-ExecutionPolicy

cypress

  1. Close and restart VS Code

This should resolve the issue and allow Cypress to run properly.

Last updated on