We all know testing is very important for software. And when it comes to UI testing, over last few years, many different solutions changed. Selenium is still big, Airbnb Enzyme was quite big, there are Mocha, Chai, Jasmine etc. Lately, I have been looking into and using more Cypress. In this post I will explain initial Cypress setup and discuss some benefits, but also challenges when using Cypress. To keep it small and simple, I will not be covering setup for reports or actual writing tests, that will be covered in different post. Only basic installation and running.
About Cypress
Cypress is one of newer solutions for UI applications testing. What makes it different from other solutions is that it is one for all. It comes bundled with tools like Mocha, Chai and Sinon. This means that once you add it, you can start writing both unit and e2e tests without installing anything else. Another, huge difference between Cypress and other solutions is that for e2e tests, it does not use Selenium. This means no known Selenium issues. Cypress runs in browser along with your application, so it has access to all native browser APIs. There are many other good sides of Cypress, but in my opinion, these are main ones. These are the reason why it is so easy to start and write tests.
Installation