Back to Blog
Headshot of Nemanja Sukara

2 minutes read

Cypress component testing

Nemanja Sukara

Software Engineer

Our software engineer, Nemanja Sukara, delivered an interesting Friday Talks session on Cypress component testing, sharing his experience with this new feature.

The presentation focused on showcasing the capabilities and advantages of using Cypress for testing individual UI components in isolation.

Introduction to Cypress

It began with an introduction to Cypress, an open-source testing framework designed for modern web applications. While Cypress is widely known for end-to-end and integration testing, the session emphasized its powerful component testing feature, which allows developers to test components independently without launching the full application.

Cypress component testing

Cypress component testing enables developers to render and test components directly in a real browser environment. This approach accelerates development and debugging by providing:

  • Real DOM interaction and realistic test execution
  • Automatic waiting for elements, removing the need for manual delays
  • An interactive Test Runner with visual snapshots and real-time feedback
  • Streamlined debugging through live inspection and detailed error messages

Comparison with React Testing Library

Nemanja also offered a comparison with React Testing Library, highlighting key differences in environment, speed, and realism. Cypress runs in a real browser, providing more authentic interaction and behavior, whereas React Testing Library uses a simulated DOM (jsdom) optimized for fast unit testing.

Nemanja demonstrated a basic example of a Cypress component test setup, illustrating how simple and developer-friendly the process can be.

A strong choice for component testing

Finally, Nemanja concluded the session with key takeaways on when and why Cypress is a strong choice for component testing, as well as how it can be integrated into modern development workflows.

We can all see that Cypress has introduced a new feature called Component Testing, which enables unit testing of individual components. This makes testing even more interactive and engaging than ever before.

Discover our blog section for more captivating topics that we’ll be sharing with you soon.

Headshot of Nemanja Sukara

Nemanja Sukara

Software Engineer

Nemanja Sukara is a frontend software developer at ProductDock, enthusiastic about building practical and user-focused solutions. With strong expertise in React, React Native, and Next.js, he has been actively involved in developing responsive, scalable, and modern web applications. His passion for clean code, performance, and continuous learning makes him a valuable contributor in the field of frontend development.


Related posts.