Table of contents
- 0.1 Selenium
- 0.2 Cypress
- 0.3 Differences between Selenium and Cypress
- 0.4 1) Speed
- 0.5 2) Programming Skills
- 0.6 3) Language Support
- 0.7 4) User Experience
- 0.8 5) User Interface(UI)
- 0.9 6) Waiting times
- 0.10 7) Team Development (Large Scale Applications)
- 0.11 8) Screenshot Capture
- 0.12 9) Mobile automation
- 0.13 Conclusion
- 1 Don’t miss amazing tips!
So, let’s start off by discussing how Cypress compares to Selenium and see the differences between Selenium and Cypress. Cypress focuses on testing APIs (Application Programming Interfaces) which can range from a single view controller all the way down to individual web pages. Selenium focuses more on testing web applications and will test both server-side and client-side web components.
Selenium is a web automation tool that allows you to drive browser-based applications by automating user actions and recording interactions with the program. However, in addition to using Selenium for automation, it can also be used for functional testing and debugging of end-to-end user scenarios. This means Selenium is an extremely powerful tool that can be used for almost any kind of software application including eCommerce websites, mobile apps, and desktop programs.
Cypress is a very similar automation tool created by Xamarin which was released in October 2015. Cypress vs Selenium so that you can use this to help determine which one is better for your needs.
Selenium is an open-source project that is supported by a large community of developers who contribute towards the project and help make it better. Selenium has been around for a very long time and has had a lot of time to mature which means it has many great features and plugins to improve your user experience. Cypress, on the other hand, is a brand new tool which means it still needs some work to catch up to selenium, but it also means that you can expect faster development because there aren’t as many contributors working on the project. Cypress has already implemented most of the popular plugins for Selenium like Page Object Model, WebDriverJS.
Differences between Selenium and Cypress
Cypress tests all run inside the browser, and Selenium can use either a real browser or a headless browser that does not require any browsers to be installed on your computer. Thus Cypress is slightly faster.
2) Programming Skills
Both Cypress and Selenium will require some level of programming skills to get started with because they are not tools that simply allow you to click around on the screen like many of the other cross-browser automation tools such as Watir and Nightwatch.
3) Language Support
4) User Experience
5) User Interface(UI)
Cypress is more modern in its user interface design than Selenium, and thus easier for users to navigate through. Cypress even offers a live preview of your test as it runs, whereas Selenium does not offer a live preview feature.
Cypress also provides a built-in file explorer for local development which is pretty cool! I don’t know of any other testing tool that allows you to scan and view the files in your local development environment without having to install anything else on your computer.
6) Waiting times
Cypress has a built-in waiting time when running tests that can be set from 0ms to 4 seconds.
Selenium does not have a built-in waiting time, but you can add in a sleep command in the code along with a delay for added waiting time.
7) Team Development (Large Scale Applications)
Selenium has been around since 2004 and is thus more widely used than Cypress which was just released in 2015. The community is bigger and you will find more resources on how to use Selenium than Cypress.
8) Screenshot Capture
You can capture screenshots of the web application you are testing in both Cypress and Selenium.
Cypress offers a built-in screenshot capture feature that many other tool do not have. This is really nice because it means you don’t have to install any additional tools on your computer or write any additional code for this feature to work.
9) Mobile automation
Selenium allows you to automate mobile apps, but Cypress is more limited in this area and doesn’t support Android or iOS.
So, if I had to choose between Cypress Vs. Selenium, Cypress would be the winner for me. But based on your needs, you may not see the same benefits I have. The best thing to do is try out each one and use whichever one works best for you.
Both Cypress and Selenium are great tools so enjoy!
You might be interested in Selenium Ruby tutorial — How to get started Part I
You might be interested in 15 things to consider when choosing software testing tools