Troubleshooting

Learn about troubleshooting Cypress in this lesson.

We'll cover the following

Cypress has a few ways to let you see what’s going on during testing. First off, each step in a test produces a snapshot that you can look at in the test runner and also inspect via the browser console that you are using. You can also trigger a screenshot to the cypress/screenshots directory by using the screenshot command.

You can send an arbitrary message to the browser console log with cy.log("message"), and you can have Cypress log the result of any chain of message by placing debug() at the end of the chain. In the next chapter, I go into the specifics of using the Cypress test runner to debug Cypress tests.

What’s next?

In this chapter, we installed Cypress, wrote our first test, and toured the Cypress commands. Next, we’ll write more complex Cypress tests to cover the rest of our application functionality and talk more about general troubleshooting of our application.

Get hands-on with 1400+ tech skills courses.