Cypress Test Automation

CypressTest AutomationSoftware Testing

Cypress supports most of the modern applications built on React, Angular and so on. Often Cypress is compared with automation tools like Selenium. There are a lot of debates on which is a better tool [Cypress and Selenium] with respect to automation.

However both Cypress and Selenium both have a set of advantages and disadvantages and it is up to the user’s requirements that we should take up a tool. Let us now discuss some of the differences between Selenium and Cypress as listed below −

  • Cypress is available for use in the form of framework or npm. It is considered as a tool. While Selenium is available for use in the form of JARs or APIs that need to be downloaded.

  • Cypress only runs on Javascript. Selenium runs on a wide range of languages like Python, Java, Javascript, Ruby so on. So Selenium has a greater usage and a very good community support.

  • Cypress supports only Firefox, Chrome, Electron and headless browser. The support for Firefox is still under development. Selenium supports all major browsers like Firefox, Chrome, IE and Safari and so on.

  • Cypress selectors include JQuery, css and some plugins for execution. So handling dynamic web tables can be tricky. Selenium selectors include class name, id, link text, partial link text, xpath, tagname and css.

  • Cypress runs execution directly in the browser and it is slightly faster. Selenium is on the slower side of execution.

  • Cypress has no synchronization issues and by default all the elements have a default timeout which are configured internally or sometimes customized. Selenium has a lot of synchronization issues and those are resolved with the help of implicit, explicit and fluent waits.

  • Cypress has the feature of capturing screenshots and videos internally without requiring any help of any external resources, libraries or third party tools. Selenium has the feature of capturing screenshots by default but for videos there is no support and it relies on external resources.

  • Cypress does not support switching to different tabs or child windows directly. It has given workarounds to support them with the help of JQuery methods. Selenium has multiple APIs which enables switching to different tabs, child windows and alerts.

  • Cypress does not support any mobile application and browser. Selenium supports mobile applications and browsers.

Cypress, being a new tool in automation, it is becoming more and more popular both with testing and development communities.

Cypress downloads in the last six months with the help of npm trends is depicted in the graph −

Source − https://www.npmtrends.com/cypress

raja
Published on 05-Aug-2020 15:54:24
Advertisements