In this tutorial, we will cover how to write your first test in Cypress. We will go over the basic Cypress syntax and run our tests using the Cypress Test Runner.
- to go to any URL, you can use the
- Cypress also provides various types of page assertions such as
cy.title()to assert the URL as well as the title of the page
To open the Cypress Test Runner, you can execute the following command below:
npx cypress open
Once the Cypress Test Runner opens up, you can execute your test which will show results similar to this below:
- You can see all the Cypress commands listed below such as visit, URL & title
- All your successful assertions will show in Green and failed assertions in Red
📧 Subscribe to my mailing list to get access to more content like this
👍 Follow automationbro on Twitter for the latest updates
I love coffees! And, if this post helped you out and you would like to support my work, you can do that by clicking on the button below and buying me a cup of coffee -
You can also support me by liking and sharing this content.
Thanks for reading!