What is Cypress?

What is Cypress?

It is a next-generation front end testing tool constructed for the modern web. This tool addresses the critical pain points developers, and QA engineers used to face when testing modern applications, E.g., synchronization issues, the inconsistency of tests due to elements not visible or available.

It is built on Node.js and comes packaged as an npm module. As its basis is Node.js, it uses JavaScript for writing tests. But 90% of coding can be done using Cypress inbuilt commands, which are easy to understand.

It also bundles with jQuery (Javascript Library) and inherits many of jQuery methods for UI components identification and simplify HTML DOM tree traversal and manipulation, as well as event handling, CSS animation, and Ajax.

What makes Cypress a unique tool?

There is multiple uniqueness, which makes Cypress one of the quickly adaptable choices for Web automation. Few of them are:

  • It delivers fast, consistent, and reliable test execution compared to other automation tools because of its architectural design.
  • Flake Resistant - Cypress automatically waits for commands and assertions before moving on. No more async issues.
  • Ability to test edge test cases by mocking the server response. (Network Requests)
  • Debuggability - It takes snapshots as your tests run. We can hover over each command in the Command Log to accurately see what happened at each step.
  • View videos of the execution of your entire tests when running from the Cypress Dashboard.

There are some drawbacks, and some of them are notable, so it would be remiss not to list them here -

  • It is relatively naive, and it does not have the vast community that Selenium does. But in recent years, it has gained momentum, and the Cypress community is increasing at a great pace.
  • As stated earlier, it's JavaScript or bust. You will not be able to write cypress tests in the old static languages such as C# and Java. On the contrary, as these days, JavaScript is one of the biggest buzzwords for frontend developments, using the same language for test automation bridges the gap between the developers and the QAs.
  • Because it runs inside the browser, there is no?support?for?multiple?browser?tabs or popups. You cannot use?Cypress to drive two browsers instances at the same time.
  • Before Cypress 4.0.0, it used to support only Chrome and Electron. Cypress 4.0.0 includes support for?Mozilla Firefox?browsers (beta support) and?Microsoft Edge (Chromium-based) browsers, which is a big step forward for Cross Browser Testing in Cypress.
  • No shadow DOM support. You can imagine the shadow DOM as a "DOM within a DOM". It is its own isolated DOM tree with its elements and styles, completely isolated from the original DOM. Also, even Selenium does not provide explicit support for working with Shadow DOM elements.
  • It doesn't support?native?mobile apps, but it does?intend to support?mobileweb browsers in the future.

What are the components of Cypress?

It has two main components that come by default in its installation - Cypress Test Runner and Cypress Dashboard. One of them is used as a runner to run our Cypress test cases on the local machine, and the other tracks our runs and status from our Automation Suite.

Test Runner: It?runs tests in a unique interactive runner that allows you to see commands as they execute while also viewing the application under test. Below are the key subcomponents of the test runner that we should pay focus while executing our test cases.

  • Test Status: Menu shows you a summary of how many tests passed, failed, or in progress and time took for the test.
  • Url Preview: shows you the URL of your test and helps you track any URL route.
  • Viewport Sizing:?set your app viewport size to test responsive layouts.
  • Command Log:?It shows you the command logs as it executes for all the tests that execute.
  • App Preview:?you can see the test while commands execute.

要查看或添加评论,请登录

NISHI KUMARI的更多文章

  • What is PMI?

    What is PMI?

    PMI or a Purchasing Managers’ Index (PMI) is an indicator of business activity -- both in the manufacturing and…

  • What is Debt Recovery?

    What is Debt Recovery?

    Debt recovery and debt collection are similar terms with one small, but very important distinction. The difference is…

  • Row-level security (RLS)

    Row-level security (RLS)

    Create roles It's possible to create multiple roles. When you're considering the permission needs for a single report…

  • What is NULL ?

    What is NULL ?

    In Structured Query Language Null Or NULL is a special type of marker which is used to tell us about that a data value…

  • Delta Format

    Delta Format

    The Delta format is a storage format used in data lakes, particularly in the context of Azure Data Factory and Azure…

  • Amazon SageMaker

    Amazon SageMaker

    Amazon SageMaker is a fully managed machine learning (ML) service provided by Amazon Web Services (AWS). It enables…

  • What is SharePoint?

    What is SharePoint?

    SharePoint is a web-based collaborative platform developed by Microsoft, launched in 2001. It is primarily used for web…

  • What is Data Pipeline?

    What is Data Pipeline?

    A data pipeline is a series of processes and tools designed to collect, process, and deliver data from various sources…

  • What is Azure Logic Apps?

    What is Azure Logic Apps?

    Azure Logic Apps, from Microsoft Azure, is a cloud-based Platform-as-a-Service (PaaS) that is used to automate tasks…

  • What is Power Automate

    What is Power Automate

    Microsoft Power Automate is a comprehensive cloud-based automation platform designed to streamline and optimize…

社区洞察

其他会员也浏览了