Cypress Limitations 2023

Cypress limitations 2023. Cypress is not a general purpose automation tool. Cypress is not a general purpose automation tool. According to official cypress docs [2]. Cypress has experimental support for Safari. No multiple tabs or browsers. Cypress doesn’t support testing scenarios involving multiple tabs or windows. This is deliberate choice by creators, some limitations “prevent you from writing bad, slow, or flaky tests ” [2]. Restricted Cross-Domain Testing. Cypress forces you to contain your tests in one app and one web page. Again, this is deliberate choice. No Tab button. Well, no TAB button. Iframe. Cypress has (or rather had) a difficulty working with iframes. Latest versions seem to have implemented a support to an extent. JS only. In browser. Cypress is executed inside browser which has some advantages and disadvantages. Cypress runs in the context of the browser. [5] You have real, native access to everything in your application under test. It is impossible for Cypress to ‘miss’ elements and it always knows the moment your application fires any kind of event. [4] But what this also means is that your test code is being evaluated inside the browser. Test code is not evaluated in Node, or any other server side language. The only language we will ever support is the language of the web: JavaScript. [4] Essentially: With Cypress it’s easier to inspect what is running in the browser, but harder to talk to the outside world. [5] Page object pattern is discouraged. Seems like this is mainly because of how chaining commands work in Cypress. Not that PO cannot be implemented in Cypress. As project progresses PO essentially stands for reusable code. So decision of using this pattern is up to tests maintainers aka you. Refer [3]. Conclusion. Seems like Cypress is mainly for QA’s who want to automate simple regression tests for modern asynchronous Single Page Applications, involving front end only and having no time to deal with common complexities that arise in the process of test automation (AJAX, web drivers, element waits to name the few). Note: Some issues remain open from 2016:

Key takeaway: Choice of test automation tool is highly dependent on the context. That is - you have to sit down and think what do you need to test and then find a best solution. Cypress is just a tool after all.

Disclaimer

comments powered by Disqus