Q&A
When should you use Playwright component testing vs full E2E tests?
Ajitesh MohantaAmbassador
2w ago 882 0
Playwright now supports component testing (React/Vue/Svelte) which blurs the line with E2E tests.
In practice I'm unsure where to draw the boundary:
- A component that fires API calls — test with mocks at component level or test the real flow E2E?
- A complex form with lots of validation — component test or page test?
- Navigation flows that span multiple pages — obviously E2E, but at what granularity?
I don't want to end up with a testing layer nobody maintains. How has your team decided this?