I thought this question from our Slack Ask Me Anything with @marie.drake and Filip Hric would be another useful one to share with folks here
When you compare Cypress to other available technologies, can you mention some pro’s and con’s? It is not important against which, but more likely what Cypress have and not have. Thanks
Filip replied with
I cannot really compare. As I said, I’m fairly new to test automation world and my experience with other tools is nowhere near my experience with Cypress.That said, there are cases where I don’t recommend trying to use Cypress
- if your app users rely heavily on legacy browsers - IE11 and lower etc.
- if you have a native (iOS, Android or Win/Mac) app that you need to test
- if you want to do performance testing
there might be more, just these came to mind.however, if you have:
- modern web app, webpage or single-page application
- your users use mostly modern browsers
- user CI/CD pipeline
- want to integrate e2e tests in your app repo as part of build
then Cypress is the clear winner I think
Marie added
so to me here’s the pros in using Cypress:
- Easy setup and installation
- Easy debugging
- Cypress Test Runner allows you to interact with your tests and you have access to anything in the browser such as window object, local storage, network requests etc. If it’s in the browser, Cypress can access it
- Live reloads (whenever you make changes to your code, the test will automatically run so you can keep the Cypress Test Runner open, no need to restart or rerun your test manually)
- Great plugins of choice that you can easily install Plugins | Cypress Documentation
- You can also do API testing with Cypress
As for the cons:
- Doesn’t support other browsers such as IE11 or Safari
- You can’t test cross domains so sometimes 2FA can be an issue if the login provider is on a separate domain. There are workarounds but it’s trickier to implement
- It doesn’t support multiple tabs but again there are some workarounds that you can do
- Doesn’t support native mobile actions such as swipe gesture
Are there any other pros or cons you would add?