Introduction to Cypress
You've created a website for yourself or for a client, and how can you be sure that it will works? OK, at the time you were working on it, of course it was working; the search form, the contact form, the various links were all functional, but how can you be sure of this over time? Wouldn't it be useful to have a procedure that would allow you to run several so-called ‘functional’ tests to check that everything is still working? This could be part of the maintenance contract you offer your customer.
What tool should you use for this type of requirement?
Cypress is a front-end testing tool that empowers developers to automate functional tests directly within the browser. It enables actions like navigating web pages, interacting with elements, submitting forms, and asserting content or URL changes, streamlining end-to-end and integration testing.
In june 2024, I've written an article about a PHP functional test tool called Behat, let's see how to proceed with Cypress which is a Javascript tool.