Home Front end The Benefits of Cypress – SD Times

The Benefits of Cypress – SD Times


With so many different testing frameworks and tools on the market today, it can be difficult to determine which one is best for you and your organization. Recently there has been a lot of talk about Cypressthe end-to-end open source testing framework for web test automation.

Andrew Knight, Developer Advocate at Applitools and an avid Cypress user, said Cypress is his favorite testing framework because of the user experience it provides. “I’ve done a lot of test automation… and Cypress is coming in and offering things like very concise syntax and automatic waiting for elements with a page to protect you from bloated scripts,” he said.

Cypress recently received an update, further enhancing the features Knight loves about the tool. Cypress Test Runner v9 5.1 added a “Ready” event to the Plugins process to ensure that all plugins have started successfully before loading the configuration and starting the tests.

This update also gives users the ability to create their own custom commands. “When it comes to web test automation, you have a lot of basic, natural stuff… But, what if you want to do something more complex like logging into an application?” said Knight.

He went on to explain that with Cypress custom commands, testers can go beyond the basics and implement more complex commands. “You can say something like ‘Cypress connect’ and you can implement that command in the Cypress command structure,” he said.

According to Knight, this saves time and increases a tester’s productivity because they no longer have to type four or five different commands to log in or run other types of commands that would normally require multiple steps.

Additionally, this new version of Cypress also offers improved testing performance and reliability on MacOS machines that leverage the VMWare CBCloud SaaS solution.

Knight also talked about the use cases Cypress is best suited for. He said the framework is especially valuable for front-end developers who want to write end-to-end tests as easily as possible in the same workflow as their usual programming.

He went on to say that this differentiates Cypress from other frameworks on the market because it comes more naturally to developers and testers. According to Knight, people working in front-end development and testing tend to shy away from other frameworks while still adopting Cypress because the other tools seem older and clunkier in comparison.

“Cypress runs in the browser and it’s all JavaScript, so if you’re already in that JavaScript world, you don’t need to learn a new language,” he said.