Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Learn Web and API Automation using Cypress with JavaScript
Highest Rated
Rating: 4.6 out of 5(743 ratings)
4,645 students

Learn Web and API Automation using Cypress with JavaScript

Mastering Cypress Automation Testing with JavaScript
Created byPavan Kumar
Last updated 12/2024
English
English [Auto],Spanish [Auto],

What you'll learn

  • Javascript Programming
  • Web Automation
  • Cypress
  • End-2-End Testing

Course content

3 sections52 lectures24h 50m total length
  • Cypress Introduction29:17

    What is Cypress?

    Who uses Cypress?

    Selenium Vs Cypress

    Cypress Ecosystem

    Features of Cypress

    Limitations in Cypress

  • Environment setup on Windows & Mac36:01

    1) Download Node & NPM

    https://nodejs.org/en/download/

    2) Set NODE_HOME Environment Variable

    3) Create Cypress Working Folder

    4) Generate package.json

    npm init

    5) Install Cypress

    npm install cypress --save-dev

    6) Download Visual Studio Code Editor

    https://code.visualstudio.com/download

  • Writing & Running Tests in Cypress32:24

    How to create and run tests in cypress

  • Locating Elements on Web Page - CSS & XPATH53:27

    Locators in Cypress

  • Assertions in Cypress57:14

    Types of assertions in cypress.

  • Project Folder structure & First Test Case13:27

    Explore the Cypress project folder structure, including downloads, e2e tests, fixtures, screenshots, and support commands, with pre-test setup, configuration, and plugins.

  • Handle Checkboxes & Radio Buttons31:24

    Handle Checkboxes & Radio Buttons in Cypress

  • Handle DropDowns49:13

    Handle different types of drop downs in Cypress

  • Handling Alerts/Popups47:54
  • Handle Tabs22:14

    Explore Cypress methods to handle tabs: remove the target attribute with Invoke to stay in the same tab, or visit the ref URL in the same tab, with domain limitations.

  • Handle Frames27:33
  • Handle Web Tables1:04:50
  • Handle Mouse Events46:29

    Master Cypress mouse actions, including mouse over, right click, and double click, using trigger and built in commands, plus drag and drop with a plugin and scroll into view.

  • Handle File Uploads33:21

    Explore how to upload files in Cypress using the Cypress file upload package. Learn to upload single and multiple files, rename during upload, use drag-and-drop, and handle shadow DOM scenarios.

  • Working with Hooks & Tags17:26
  • Working with Cypress Fixtures & Data Driven Testing37:14
  • Custom Commands in Cypress35:44

    Learn how to create and override custom commands in Cypress, using Cypress.Commands.add in the commands file to click links by label and simplify login workflows for test reuse.

  • Navigation's8:54

    Learn how to navigate between pages in Cypress using the go command, including back, forward, and reload, with practical examples of visiting pages, clicking elements, and asserting titles.

  • Capture Screenshots & Videos on Failures15:20

    Learn to capture screenshots and videos with Cypress, both intentionally and automatically on test failures, including whole-page and element screenshots, and run tests in headless mode from the terminal.

  • HTML Report Generation11:50

    Steps to Generate HTML Report:

    --------

    1) install cypress-mochawesome-reporter

    npm i --save-dev cypress-mochawesome-reporter


    2) Change cypress reporter & setup hooks

    Edit config file (cypress.config.js by default)


    const { defineConfig } = require("cypress");

    module.exports = defineConfig({

      reporter: 'cypress-mochawesome-reporter',    // for reports

      e2e: {

        setupNodeEvents(on, config) {

          // implement node event listeners here

          require('cypress-mochawesome-reporter/plugin')(on);   // for reports

        },

      },

    });


    3) Add to cypress/support/e2e.js

    import 'cypress-mochawesome-reporter/register';


    4) run cypress

    npx cypress run --spec cypress\e2e\MyTest.cy.js



  • Page Object Model Pattern29:55

    Learn how the page object model pattern in Cypress organizes page elements into dedicated classes, enabling reusable actions, centralized locators, and easier maintenance for multi-page tests.

  • Cypress Command Line & Dashboard services18:52

    ▪How to run Cypress from the command line

    ▪How to specify which spec files to run

    ▪Working with Dashboard features

    –Capture screenshots

    –Recording


    ▪cd C:\Users\admin\CypressAutomation>

    ▪To Run all the specs in command line

    –node_modules\.bin\cypress run

    ▪To Run specific specs the tests in command line

    –node_modules\.bin\cypress run --spec "cypress\integration\examples\FirstTest.spec.js"

    Dashboard

    ▪https://dashboard.cypress.io/login

    ▪Screenshots & Recording feature in Dashboard

    –cypress run --record --key d63f3548-892b-41b9-bcb7-07ae3cbf9f9b

  • Continuous Integration with Cypress and Jenkins18:33

    "scripts": {

    "test": "node_modules\\.bin\\cypress run --config pageLoadTimeout=100000",

    "runtests":"npm run test --"

    }

Requirements

  • Need to know basics of software testing.

Description

Course Title: Mastering Cypress Automation Testing with JavaScript (Updated for Cypress 12.x)

Course Overview:

Welcome to the cutting-edge world of Cypress Automation Testing, where we bring you the latest and most comprehensive course designed to propel your testing skills into the future. In this course, we delve into both Web and API Automation Testing using Cypress, the forefront technology known for its speed, simplicity, and reliability across modern web applications.

Course Highlights:

  • Updated for Cypress 12.x (Latest Version): Stay ahead of the curve by mastering the most recent features and enhancements in Cypress with JavaScript.

  • Web & API Automation Focus: Covering both realms, this course equips you with the skills to automate testing seamlessly in the browser and API environments.

  • From Basics to Advanced Concepts: Whether you're new to JavaScript or a seasoned developer, we've got you covered. The course includes a comprehensive review of JavaScript programming, starting from the basics and progressing to advanced topics.

  • Real-Time Examples: Learn through practical, real-time examples that provide a hands-on understanding of Cypress concepts and best practices in framework design.

  • No Prerequisites: This course is designed to cater to all skill levels. We've taken care of everything, including JavaScript basics, so you can dive right into the exciting world of Cypress Automation.

  • Theoretical Material & Coding Resources: Each session comes with theoretical material and coding resources that you can download, ensuring a well-rounded learning experience.

Course Contents:

  1. JavaScript Programming:

    • Introduction

    • DOM (Document Object Model)

    • Environment Setup

    • JavaScript Basics: Comments, Statements, Variables, Data Types, Operators, etc.

  2. Web Automation using Cypress:

    • Cypress Introduction

    • Selenium Vs Cypress

    • Environment setup on Windows and Mac

    • Writing and organizing tests

    • Interacting with elements

    • Handling UI Elements, Alerts, Frames, Navigation, File Uploads, Mouse Events, Tables, etc.

    • Working with Hooks and Data-Driven Testing

    • Custom Commands in Cypress

    • HTML Reports Generation

    • Page Object Model Pattern

    • Cypress Command Line & Dashboard services

    • Continuous Integration with Cypress and Jenkins

  3. API Automation using Cypress:

    • Introduction to API Testing

    • Setting up the Project

    • HTTP Methods: GET, POST, PUT, DELETE

    • Request Body Creation, Path Parameters, Query Parameters, Headers, and Cookies

    • Parsing Response, JSON & XML Schema Validations

    • Authentication Types: Basic, Digest, Preemptive, OAuth 2

    • API Chaining

Join us on this exciting journey, and let's empower you to become a master in Cypress Automation Testing with JavaScript.

Who this course is for:

  • Freshers, Manual Testers, Automation Testers