Benevolent Bytes
Published in

Benevolent Bytes

Thank by @JamesDaly90 for the slick illustration used as part of this title card

Why Cypress is the best way to test

How to start testing web apps with Cypress, a brief tutorial

Getting started with Cypress in minutes

Get Setup

Add the cypress:open command to the scripts section of your package.json

Let’s Write a Test

Screenshot of the login page we want to test
Some simple Cypress tests for a Login page
A sample test from login.sepc.js ensuring an email can be typed into the email input
A sample test from login.sepc.js ensuring invalid credentials show that the login fails

Interactive testing — See what’s going on

Running our test and seeing the results interactively in the browser
Running our tests with failures interactively
Running test suite with “cypress run”

Test Output — Cypress’ coolest feature

A screenshot taken by Cypress on a failed test run

Should I use Cypress?



Thoughts, stories and ideas about development. Web development and beyond.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Seth Corker

Sharing ideas, facts, and opinions about programming. 📚 Learn more React and JavaScript. 🗺 Learn web development tips and tricks 🛸 Discover something new