From the course: End-to-End JavaScript Testing with Cypress.io
Unlock this course with a free trial
Join today to access over 24,100 courses taught by industry experts.
Debugging Cypress tests
From the course: End-to-End JavaScript Testing with Cypress.io
Debugging Cypress tests
- [Instructor] Now, it's a very common thing when we're writing or running Cypress tests that our application doesn't quite behave as we expected and we're not really sure why. Now in these situations, it's really helpful to be able to pause our application at a specific point and debug it like we normally would. And this is something that even Cypress' snapshots here don't really do since they really only show you what the visible part of the app looked like at the point when the snapshot was taken. In other words, if something went wrong in our application, if there was some kind of problem with the application state, many times we need to actually look at that internal state to figure out what the root cause was of that problem. Now Cypress provides several nice tools for us. The first tool is simply called debugger, and this allows us to pause the execution of our tests at a specific point in our code, not just at specific assertions or actions that we make. Now, what debugger…
Contents
-
-
-
-
-
(Locked)
Interacting with elements6m 6s
-
(Locked)
Triggering other actions8m 46s
-
(Locked)
Common assertions8m 46s
-
(Locked)
Automatic retries3m 21s
-
(Locked)
Debugging Cypress tests5m 41s
-
(Locked)
Setting environment variables6m 10s
-
(Locked)
Working with test doubles4m 34s
-
(Locked)
Challenge 2: Writing your own tests1m 20s
-
(Locked)
Solution 2: Writing your own tests3m 29s
-
(Locked)
-
-