About Cypress JS in 2022
Mocha, the framework upon which it is based, simplifies and streamlines asynchronous testing. Web frameworks like React, Vue.js, and Angular all make heavy use of it. The usage of Cucumber is not exclusive to Cypress; the framework may be enabled in the settings.
Unlike Selenium, Cypress scripts cannot be run in a standalone application. All of Cypress’s test scripts are run directly in the browser. Cypress does not, for instance, use a specialized driver to communicate with the browser when a user clicks a certain button. To trigger the button’s click, it relies on DOM events instead.
Cypress is entirely built on the Chrome DevTools Protocol (CDP), a standard created to make it possible to use a debugger within Chromium-based browsers. Cypress is discovered to have almost the same performance, or slightly slower, as Selenium WebDriver.
Pros & Cons of Cypress JS
- Cypress runs the code as the developer types it, allowing for instantaneous feedback.
- Mocking objects like stubs, and clocks are supported to check the behavior of server responses.
- Cypress framework takes screenshots during the actual execution of tests. If a quality assurance tester or software engineer is interested in the specifics of a single command’s execution, they may simply hover over that command in the Command Log and read the detailed log entry that appears.
- When it comes to documentation, Cypress has you covered. There is exhaustive documentation on most major use-cases for the framework.
- In addition, it can access the network layer above the application, allowing us to manage all network requests that are made to and from our service. Also, this may be quite helpful for testing out various scenarios, such as what happens in the event that our server encounters an unexpected fault.
- Cypress JS is Open source software with a robust community and a history of active maintenance.
- Cypress JS will automatically wait for commands and assertions before moving on.
- Cypress doesn’t let us split our testing across two superdomains. Domains like google.com and linkedin.com are examples of what some people term “superdomains.” As of right now, two separate tests are required to access two separate superdomains. This is due to the internals of Cypress, but in practice you should only ever need to access many superdomains in a single test if you’re interacting with things like OAuth providers, and even then there are workarounds.
- You can only test one tab or window at a time in a browser. Cypress doesn’t let you do this because, in their opinion, there’s never a legitimate need to test in more than one tab or browser at once. Support for iFrames is quite limited.
- There is a lack of AI-powered features that some competitors like testRigor have. testRigor automatically detects the most important user workflows in your application.
While Cypress is an open source project, it also has paid offerings with transparent pricing. Paying annually results in a 12% discount.
First, the free tier allows for 3 users and 500 test results per month, and includes parallelization, load balancing, viewing run failures, analytics, integrations with Slack, GitHub, GitLab, and Bitbucket. Support for the free tier is limited to community support.
The next tier starts at $75 per month, and allows for 10 users and includes 10,000 test results per month. In terms of features, everything from the free tier is included in this Team tier, plus flake detection, JIRA Integration, and support via email. For this tier, a pricing estimation is provided based on test volume beyond 10,000 tests.
The Business Tier starts at $300 per month and allows for 40 users with 10,000 test results per month included. This Tier includes everything from the Team tier, plus a number of other features like SSO, “Smart Orchestration” that can run failed specs first and cancel runs on failure, and additional features that are coming soon like “Flake Management” with test muting and test burn-in, GitHub Enterprise support and GitLab for Enterprise support. Under this tier, customer support is still handled via email. There is also a pricing estimation tool for more than 10,000 tests per month.
Finally, the Enterprise tier requires a discussion for custom pricing, as you might expect from a SaaS product. The main benefits of this tier are that tests are unlimited, you get to run as many tests as you need, and your team gets premium support.
While Cypress JS is a strong contender for those wishing to do frontend testing there are some significant limitations as well that one needs to be aware of. There are other tools especially no-code ones that have a easier learning curve and have better test maintenance features.