Introduction to Testing with Cypress
Here's a quick introduction to Cypress and the reasons why we should use it.
We'll cover the following...
Testing JavaScript code is notoriously difficult. Because JavaScript typically runs in a browser environment and interacts closely with the DOM and user behavior, it is often challenging to write tests that have value and are consistent and fast.
When thinking about testing JavaScript, it’s helpful to think about what you want to get out of testing. In this chapter, we’ll focus on two goals:
- Using tests to validate that the code is doing the things we think it is doing
- Using tests to help development by allowing us to rapidly run situations that would take a long time to recreate manually
While a wide variety of testing tools are available in JavaScript, in this chapter, our focus is on end-to-end testing with ...