Playwright Component Testing
Status: Experimental (since 2022)
Recommendation Just use the stable Vitest Browser (Starting from Vitest v4)
OverviewLink to heading: Overview
- Cross-framework support (React, Vue, Svelte)
- Real browser testing environment
- Unified tooling with E2E tests (Playwright becomes a E2E standard nowadays)
Known Issues & TradeoffsLink to heading: Known Issues & Tradeoffs
- Unstable API: It's still experimental, things are expected to be breaking
- Lack of the clear MVP plan: All the information is scattered in many Github Issues
- Lack of a clear roadmap: Playwright does not share any public roadmaps
- Rely on prod build: Currently doesn't support HMR and watch mode, not really friendly for gigantic apps with slow build times
- Code coverage: No support yet like in the Jest/Vitest
Adoption ConsiderationsLink to heading: Adoption Considerations
- New Projects: Consider waiting for beta/stable release
- Existing Projects: Consider waiting for stable release
- Just use the stable Vitest Browser (Starting from Vitest v4)
There are also great alternatives, that allow testing components in real browser: