Test automation with Cypress (intermediate)
4.2 (6 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
39 students enrolled

Test automation with Cypress (intermediate)

Optimize GUI tests with API calls
4.2 (6 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
39 students enrolled
Last updated 5/2020
English
English [Auto-generated]
Current price: $18.99 Original price: $29.99 Discount: 37% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 2 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • How to optimise Cypress GUI tests using API calls
  • How to create tests that interact with the application via the operating system level
  • Cross-browser testing with Cypress
  • API testing
Course content
Expand 10 lectures 02:11:10
+ Test automation with Cypress (intermediate)
10 lectures 02:11:10

In this lesson you will learn:

  • How to start the application under test (AUT) using Docker

  • Some functionalities of the AUT (e.g., changing password, login, access token creation, and addition of an SSH key)

Preview 08:35

In this lesson you will learn:

  • How to clone a git project

  • How to initialize a node project using NPM (node package manager)

  • How to configure git to ignore files and directories

  • How to install and initialize a test automation project with Cypress

  • Understanding the basics of the package.json and package-lock.json files

  • How to configure a baseUrl with Cypress

  • How to use variables to keep sensitive data protected and reusable

Preview 14:33

In this lesson you will learn:

  • How to create simple GUI tests for the functionalities of login, logout and project creation

  • How to structure tests in an organized and standardized way (describe, it, and beforeEach)

  • An alternative to fixtures (the faker library)

  • How to create custom commands

  • How to run a single test in both interactive and headless modes

Basic GUI tests
31:24

In this lesson you will learn:

  • How to create GUI tests for the functionality of issue creation (functionality that depends on a project creation)

  • The problems of doing everything via GUI

Preview 10:07

In this lesson you will learn:

  • How to create API tests for the functionalities of project and issue creation

  • How to organize custom commands for API calls

  • How to use the access token

  • cy.request (method, url, body)

  • Dependencies between API custom commands

API testing
15:19

In this lesson you will learn:

  • How to optimize GUI tests using API calls for the creation of test pre-conditions

  • How this approach helps on test speed and independence

Optimizing GUI tests using API calls
05:07

In this lesson you will learn:

  • How to create complex GUI tests for the functionalities of labeling an issue and adding a milestone to an issue

  • The importance of using API calls for the creation of the state in the application for tests that require many pre-conditions (project, issue, label, and milestone creation)

  • The importance of testing via GUI only once

Tests with many pre-conditions
16:14

In this lesson you will learn:

  • How to create tests that interact with the application in the operating system level for the functionality of git clone

  • How to run assertions on the content of a file

Executing commands at the operating system level
11:10

In this lesson you will learn:

  • How to run all tests in headless mode using the npm test script

  • How to run all tests in interactive mode

    1. Cross-browser testing (Chrome, Chrome Canary, Firefox, Edge, Electron)

  • How to turn off the container

Running all tests
10:50

In this class will be discussed:

  • Practice leads to perfection, and so, I suggest you explore the AUT to practice the new learnings for other functionalities

  • Data clean up for each test (GUI or API?) Or, would it be worth starting a new and clean Docker image for every execution?

  • Tests’ parallelization

  • Other uses for cy.exec()

  • Eliminating the need for GUI login for all tests (e.g.: Mattermost)

  • Eliminating the need of a real server for API calls

  • Another sample project (GitLab Cypress)

Next steps
07:51
Requirements
  • Requirement: git, node (12.14.1), NPM (6.13.4), and Docker installed on your computer
  • Requirement: a computer with at least 2 cores, and 8GB of RAM
  • Recommended: basic knowledge of HTML, CSS selectors, JavaScript, Rest APIs, command line, and NPM (node package manager)
  • Recommended: Introductory course of test automation from the Talking About Testing school
  • Recommended: Basic course of test automation with Cypress from the Talking About Testing school
Description

Cypress is an open-source framework that allows writing automated tests in an easy, fast, and reliable way, all in JavaScript.

Besides that, Cypress is friendly for developers and QA engineers, and it’s not based on Selenium!

This means that, with Cypress, it’s possible to interact with web applications in ways that were not possible before, and this is exactly what you will learn during this course.

In this course you will learn:

  • How to set up the application under test (AUT) using Docker

  • How to set up the test automation project with Cypress

  • How to create basic GUI (graphical user interface) tests with Cypress

  • How to create intermediate GUI tests with Cypress (2 pre-conditions)

  • API testing with Cypress

  • How to create tests in an optimized way using API calls

  • How to create tests that interact with the AUT via the operating system level

  • How to run all tests

  • Next steps in the journey to learn Cypress

Who this course is for:
  • Software developers, QA engineers, and software testers with basic knowledge of test automation