Testing WordPress websites and applications can be time-consuming and labor-intensive. Yet, most people manually test their work in the browser… assuming they do any testing at all. Bring up automated testing and most people will write it off as complicated, a maintenance burden, or they simply don’t understand the value.
In this hands-on developer workshop, we will be learning to use Cypress, an end-to-end JavaScript testing framework that makes automated testing easy. Essentially, Cypress acts as a user on your website by visiting pages, filling out forms, and clicking buttons. It can also validate CSS, perform accessibility checks, and run tests across different viewport sizes and browsers.
The beauty of end-to-end testing is that tests are quicker to write and are more robust than any other type of testing. A unit test will only tell you if a function is working properly, but an end-to-end test can alert you if something in the code, the database, or even the design isn’t right. If you are new to testing, this is the place to start!