Cypress: painless web testing

Modern e2e testing with Cypress.io
Angular Minsk #2

Who am I ?

Agenda

Testing pyramid

Testing pyramid

Choose your side

Recap of Front-end Development in 2018

Many realize that end to end testing is the starting point of doing tests correctly in large part due to Cypress (i.e. Cypress first, then Jest).

Front-end Developer Handbook 2019

End to end testing strategies

Installing Cypress

                    npm install cypress --save-dev
                    yarn add cypress --dev
                

Testing login form

Hello world

Running Cypress

                    npm run start
                    npm run cypress:open
                    yarn run cypress:open
                    npx cypress open
                

Cypress test runner

Running the test

Differences from Selenium

Folder structure

Basic configuration

Querying elements

Commands

Custom commands

Asserting

Bundled tools

Aliases

Working with network

Other features

How does it works

Why do we like Cypress

Continious integration

                    npm run build:prod
                    http-server dist/app -c-1 -p 4200 --silent
                    npx cypress verify
                    npx cypress run
                

Debugging

Debugging

Issues we found

There is no silver bullet

Permanent tradeoffs

Temporary tradeoffs

Links

Thank you!