ABSTRACT

Unit Integration Testing (UIT) had been a challenge because there was no tool that could help in XHR programming and unit integration validations in an efficient way until Cypress arrived. Cypress started releasing versions in 2015 and became popular in 2018 with version 2.0.0.

This book explores Cypress scripts that help implement ‘shift left testing’, which is a dream come true for many software testers. Shift left occurs in the majority of testing projects, but could not be implemented fully because tools were unavailable and knowledge was lacking about the possibilities of testing early in the life cycle. Shift left is a key testing strategy to help testing teams focus less on defect identifications and more on developing practices to prevent defects.

Cypress scripts can help front-end developers and quality engineers to work together to find defects soon after web components are built. These components can be tested immediately after they are built with Cypress Test Driven Development (TDD) scripts. Thus, defects can be fixed straight away during the development stage. Testing teams do not have to worry about finding these same defects in a later development stage because Cypress tests keep verifying components in the later stages. Defect fixing has become much cheaper with Cypress than when other tools are used. The book also covers Behaviour Driven Development (BDD)-based Gherkin scripts and the Cypress Cucumber preprocessor, which can improve test scenario coverage.

Automated Software Testing with Cypress is written to fulfil the BDD and TDD needs of testing teams. Two distinct open source repositories are provided in Github to help start running Cypress tests in no time!

chapter Chapter 1|12 pages

Visual Regression

chapter Chapter 2|4 pages

Web Accessibility Testing

chapter Chapter 3|6 pages

Running Cypress Tests in Docker

chapter Chapter 4|10 pages

Test Reports

chapter Chapter 5|6 pages

Cypress Tests in Jenkins

chapter Chapter 7|4 pages

Differences Between Selenium and Cypress.io

chapter Chapter 8|2 pages

Cypress Cucumber Preprocessor Errors

chapter Chapter 9|4 pages

Device Compatibility Testing Using Cypress.io

chapter Chapter 10|2 pages

Disabled Object Verification Through Force: True

chapter Chapter 11|6 pages

Upload File Using Cypress.io

chapter Chapter 13|4 pages

Testing Dropdowns Using Cypress.io

chapter Chapter 14|8 pages

BeforeEach and AfterEach Hooks

chapter Chapter 15|10 pages

Generic Test Automation Architecture of Cypress.io

chapter Chapter 16|6 pages

Cypress-based API Testing

chapter Chapter 17|10 pages

BrowserStack-based Cypress Test Execution

chapter Chapter 18|2 pages

Capture/Playback Approach of Test Automation

chapter Chapter 20|2 pages

DAST with Cypress.io and BurpSuite

chapter Chapter 21|6 pages

Click Function Using Cypress.io

chapter Chapter 23|4 pages

Double Click Function Using Cypress.io

chapter Chapter 24|2 pages

Cypress Retry on Failed Tests

chapter Chapter 25|6 pages

Mouse Events Using Cypress.io

chapter Chapter 26|2 pages

Checkboxes Verification Using Cypress.io