Suggest an editImprove this articleRefine the answer for “How does component testing differ from E2E?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**A component test** checks one specific component in isolation: whether it works correctly on its own. **An E2E test** checks a complete user scenario from start to finish in a real browser. **Key point:** component testing protects the UI building blocks, while E2E protects user scenarios; the two approaches complement rather than replace each other.Shown above the full answer for quick recall.Answer (EN)ImageComponent testing and E2E testing check the interface at different levels. --- ### **What a component test checks** - One specific component **in isolation** - Its rendering, state and reaction to actions - Behavior with different props and events **Focus:** *a small, controlled fragment of the UI.* **The question it answers:** *"Does this component work correctly on its own?"* --- ### **What an E2E test checks** - A complete user scenario **from start to finish** - The interaction of many components, APIs, routes, data and pages at once - The real operation of the application in the browser **Focus:** *the behavior of the whole system through the user's eyes.* **The question it answers:** *"Can the user complete the task without errors?"* --- ### **The key difference in scale** | Characteristic | Component test | E2E test | | --- | --- | --- | | Level | Local (one component) | Global (the whole user journey) | | Context | Isolated DOM | Real browser, routes, server | | Speed | Fast | Slow | | Failure cause | Easy to find | Can be unclear | | Goal | Check the behavior of a block | Check a working scenario | --- ### **The main idea** - **Component testing** protects the UI building blocks - **E2E** protects user scenarios Both approaches are needed, but they complement rather than replace each other.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.