Cypress Limitations | Bondar Academy
Course: Cypress UI Testing with JavaScript
Module: Introduction
Instructor: Artem Bondar
Lesson Summary
In this video lesson, the instructor discusses the trade-offs and limitations of using the Cypress framework for testing. Key Limitations of Cypress Browser Window and Tab Switching: Cypress does not support switching between browser windows or tabs. If an application flow opens a new window, you cannot switch to it to continue execution. Workarounds exist, but direct switching is not possible. Handling Iframes: While Cypress can interact with iframes, this functionality can be flaky and unstable . Additional code or waiting may be required to ensure stability when working with iframes. Parallel Execution: Cypress offers a Parallel Execution feature, but it is not free. To enable this feature, users must subscribe to the Cypress Cloud Service . This service provides additional benefits such as a dashboard for execution history and debugging options. For small applications with fewer tests (20-50), running tests in a single thread is usually sufficient. However, for larger applications with hundreds of tests, subscribing to the Cypress Cloud Service may be necessary. Despite these limitations, Cypress is praised for its fast and stable performance, requiring fewer lines of code for automation compared to other frameworks. The Cypress Runner provides an excellent feedback loop and simplifies debugging, enhancing the overall testing experience. The course will cover various features of Cypress, enabling users to utilize the framework effectively by the end.
Video Transcript
Hey guys, before we begin, I would like to talk about some of the Cypress trade-offs and limitations that you should be aware about. So Cypress is a fantastic framework. It's fast and stable, and architecturally, it runs inside of the browser. Because of this architectural decision that Cypress team made, it has a certain limitations that you should be aware about. So first of all, limitation number one is that framework does not support switching between the browser windows or browser tabs. For example, if your application flow on click opens a new browser window, and you need to switch to this window to continue the execution flow, you will not be able to do that, and that's the limitation unfortunately. There are several workarounds available, how you can manage those types of scenarios, but you will not be able to switch to that window to continue this scenario. The next limitation is related to the iframes. So Cypress can work with iframes and interact with iframes, but unfortunately, it sometimes can be flaky and unstable, and it depends on case by case. If your application has iframes, just be aware that you may need to add some extra code or extra waiting or something like this to make sure that your iframe scenario would be stable. The last limitation is the availability of the Parallel Execution. So Cypress is the free and open-source framework, but only one feature of this framework is not free, which is a Parallel Execution. So to enable Parallel Execution, you will need to subscribe to Cypress Cloud Service, and the service is actually great. So apart from Parallel Execution, it will give you a nice dashboard with a history of execution, with a debugging option, and with other cool features, but you need to pay for it. So if you have a small application and running tests in Parallel is not a big deal, like you have 20, maybe 50 tests, running in a single thread is absolutely fine. But if you are planning to scale to few hundreds of tests, most likely you will need Parallel Execution, and in this case, you will need to enroll to the Cypress Cloud Service. So if for you or for your company is not a big deal at all to pay for the service, then great. This actually a great service, and like I said, Cypress Cloud will give you other additional features that will be useful for your automation journey. And for the small project, running a single thread is absolutely fine. So that's pretty much it. Other than that, this framework is great. You will need to write like a fewer lines code possible to automate the scenario compared to any other frameworks on the market. The feedback loop from the Cypress Runner is great. The debugging of the test is also very fast and easy. Cypress Runner experience is fantastic, and we will go through all those Cypress features during the course, so you will be able to use this framework at its full potential by the end of this course. So see you in the next lesson.