This video is available to students only

Module 8 Summary

This lesson is a summary of module 8.0, where we integrated Cypress into a React app and wrote automated end-to-end tests.

Module 8 summary#

This lesson is a summary of what we've covered in Module 8.0.

In this module, we learned:

What's the purpose of end-to-end tests, and How Cypress does it better#

End-to-end tests are one more form of automated testing we can use to give us confidence that our application will work as intended.

Unlike unit tests that focus on small pieces of an app's functionality and try to test many possible scenarios, e2es are designed to test the whole flow through an application, and due to their increased run time and complexity, generally only test happy path scenarios.

And Cypress is what's made end-to-end testing much more palatable in recent times. Prior to Cypress, e2e testing was tough to set up, tough to write and debug tests, and tough to cover all possible frontend scenarios — be they multi-browser compatibility or working with many different frontend frameworks.

In 2015, Cypress came in swinging, and in short order, it became the favorite for e2e testing for good reason. With one extra npm library and a locally running instance of an app, Cypress is ready to roll, and its ease of use just keeps getting better.

How to add Cypress to our app and get us ready to test Hardware Handler#

Cypress makes end-to-end testing much easier than it used to be, but there's still some initial configuration required — and some nuances to learn to make the most of all the framework has to offer.

We downloaded Cypress, checked out its recommended e2e testing structure, and added a few new npm scripts and config files to ensure our e2e tests were of the best quality they can be.

Start a new discussion. All notification go to the author.