What you’ll learn
- How to configure the streaming reporter for component tests
- What evidence TestDino captures (traces, screenshots, video)
- How component test results appear alongside E2E tests
Quick Reference
| Topic | Link |
|---|---|
| Setup | Install the component testing package and TestDino reporter |
| Configuration | Add the reporter to playwright-ct.config.ts |
| Run tests | CLI and reporter methods |
| CI integration | GitHub Actions workflow |
| Limitations | Known constraints |
Supported Frameworks
| Framework | Package |
|---|---|
| React | @playwright/experimental-ct-react |
| Vue | @playwright/experimental-ct-vue |
| Svelte | @playwright/experimental-ct-svelte |
NotePlaywright component testing is experimental. The API may change between Playwright versions. See the Playwright component testing docs for full API details.
Setup
Initialize component testing
Run the Playwright scaffolding command to create a
playwright/ directory with index.html and index.ts files:- npm
- yarn
- pnpm
Install the TestDino reporter
Configure the TestDino Reporter
Add@testdino/playwright to the reporter array in your playwright-ct.config.ts. The configuration is the same as E2E tests:
playwright-ct.config.ts
debug, ciRunId, artifacts, and coverage. See the Node.js CLI reference for the full list.
Run Tests
Option 1: TestDino CLI
Pass--ct to run component tests instead of E2E tests:
Option 2: Playwright CLI
If you configured the reporter inplaywright-ct.config.ts, run Playwright directly:
CI Integration
Component tests run in CI the same way as E2E tests. The only difference is the--ct flag or the component testing config file.
- GitHub Actions (tdpw CLI)
- GitHub Actions (reporter)
.github/workflows/component-tests.yml
Limitations
- Experimental API. The component testing API may change between Playwright releases.
- Plain data only for props. Complex objects like class instances do not serialize across the browser boundary. Pass plain objects, strings, numbers, and dates only.
- Callbacks are async. Event handler callbacks run in Node.js while the component runs in the browser. Synchronous return values from callbacks do not work.
Supported TestDino Features
All TestDino features work with component tests the same way as E2E tests.Annotations
Add metadata and Slack alerts to tests
Code Coverage
Track coverage per test run
Flaky Test Detection
Identify and track flaky tests
Real-Time Streaming
Monitor live test execution