Skip to content

bthompzon/Cypress2022

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cypress2022

Latest Cypress Learnings 2022

Installation

prerequisites:

  • Install NodeJS
  • install Visual Studio Code (Or another IDE)

Step 1: Initialize the project and create the package.json file

npm init

Step 2: Install Cypress

npm install cypress --save-dev

Step 3: Open the Cypress Debug Window (If first time it will install itself)

npx cypress open

Step 4: Install Typescript

npm install --save-dev typescript

Step 5: Install Rimraf which takes care of cleaning before building

npm install --save-dev rimraf

Running tests

Run all tests (Note: The below command is setup in the package.json)

npm run cy.open

Run all tests headless

npm run testheadless

Learning Objectives

  • What is supported?

  • What is not supported?

  • Locator cheat sheet

  • Command line runs (By filename, By Tag?, By directory)

  • Passing args in command line

  • Reports

  • Mocking

  • Assertions

  • Page Object Model

  • Debugging

  • Intellisence in Visual Studio code

  • Typescript?

  • Running on more than one browser?

  • How to setup to run in multiple environments -

  • How to set base URL

  • Running headless

  • Snapshot testing (DOM Comparison) - DONE

  • Visual testing - DONE

Questions for Joel:

npm run cy.open - If I make a change and save will it update in cypress test window? BaseUrl will it not automatically load this before tests How can I run say a login sequence for all tests whichout added it to all test scripts?

About

Latest Cypress Learning 2022

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published