0% found this document useful (0 votes)
7 views9 pages

Cypress Lab Sheet

This document outlines the steps for setting up a Cypress lab project for software engineering. It includes prerequisites, project initialization, and instructions for configuring end-to-end testing. The guide details the creation of necessary folders and files, as well as how to run test scripts within the Cypress interface.

Uploaded by

vinu.v.perera
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views9 pages

Cypress Lab Sheet

This document outlines the steps for setting up a Cypress lab project for software engineering. It includes prerequisites, project initialization, and instructions for configuring end-to-end testing. The guide details the creation of necessary folders and files, as well as how to run test scripts within the Cypress interface.

Uploaded by

vinu.v.perera
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

SE3010 – Software Engineering Process & Quality Management

Cypress Lab Sheet

Prerequisites

Install Node.js

Install VSCode

Step 1:

Create a folder for the lab project

Step 2:

Initialize a new Node.js project

Step 3:

Install cypress
SE3010 – Software Engineering Process & Quality Management

Cypress Lab Sheet

Step 4:

Project Setup

Open the project folder in Visual Studio Code.

Open a new terminal in vscode (command prompt terminal NOT Powershell)

Run command 'npx cypress open' to open cypress

It should open the cypress web interface


SE3010 – Software Engineering Process & Quality Management

Cypress Lab Sheet

Note that E2E Testing is not yet configured.

Step 5

click on E2E testing


SE3010 – Software Engineering Process & Quality Management

Cypress Lab Sheet

Click continue
SE3010 – Software Engineering Process & Quality Management

Cypress Lab Sheet

Step 6

Select your web browser and click start testing.

Then you will be directed to an interface like below.

Close the browser windows and go back to your vscode project

Your project should have a cypress folder created as shown below.


SE3010 – Software Engineering Process & Quality Management

Cypress Lab Sheet

Step 7

Create a folder called e2e inside the cypress folder

Inside the cypress/e2e folder, create a new file called simple_test.cy.js.


SE3010 – Software Engineering Process & Quality Management

Cypress Lab Sheet

Step 8

inside this file, you can add your test scripts


SE3010 – Software Engineering Process & Quality Management

Cypress Lab Sheet

Step 9

save your file and open cypress again using 'npx cypress open' command

Now your e2e testing should be configured

Step 10

click on e2e testing and select your browser


SE3010 – Software Engineering Process & Quality Management

Cypress Lab Sheet

Step 11

Now the test script is visible. Double click on it to run the test

The left-hand side shows the testing output. The right-hand side shows the snapshots of the web
page during the execution of each test.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy