How piwitests/platform works
Piwi is a self-hosted Playwright results platform: a reporter streams or submits run data, which the application retains and presents as history, failure investigations, and test-health insights. Engineers browse run evidence, compare trends, triage failure clusters, and optionally use AI diagnosis or locator-healing features. The README also documents desktop/local workflows, notifications, integrations, analytics, REST and MCP access. The tree and excerpts expose only selected implementation details, so links to larger unsampled subsystems reflect documented capabilities rather than inspected call paths.
Main entry points: server Piwi server · useStreamingDiagnosis.ts AI diagnosis · stream-manager.ts Reporter stream · index.vue Run history and detail
Components 22
Run capture
- Reporter stream
packages/reporter/src/internal/streaming/stream-manager.ts
Run retention
- Piwi server
apps/application/server - Run database
- Evidence storage
apps/application/server/storage - Run history and detail
apps/application/app/pages/projects/[id]/index.vue
Failure investigation
- Test evidence detail
apps/application/app/pages/test-cases/[id].vue - Failure clusters
apps/application/app/pages/failure-clusters/[id].vue - AI diagnosis
apps/application/app/composables/useStreamingDiagnosis.ts - Locator healing
apps/application/app/components/shared/LocatorHealingPanel.vue - Locator matching engine
apps/extension/src/content/locator-engine.ts
Analytics and insights
- Cross-project analytics
apps/application/app/pages/analytics/index.vue - Custom dashboards
apps/application/app/composables/useDashboards.ts - Scheduled reports
apps/application/app/pages/reports/index.vue - Notifications
apps/application/app/composables/useNotificationStream.ts
Access and integrations
- Desktop workflows
apps/application/app/components/desktop - Issue tracker integrations
apps/application/app/components/integrations - REST and OpenAPI
apps/application/server/api - MCP server
apps/application/app/pages/mcp.vue
Other components
- Playwright tests
- Git changes
- Engineer
- Configured LLM
Connections 31
- Playwright tests → Reporter stream: reports results
- Reporter stream → Piwi server: streams run events
- Piwi server → Run database: stores run data
- Piwi server → Evidence storage: stores evidence
- Engineer → Run history and detail: browses runs
- Run history and detail → Piwi server: requests run data
- Engineer → Test evidence detail: investigates tests
- Test evidence detail → Piwi server: requests evidence
- Engineer → Failure clusters: triages failures
- Failure clusters → Piwi server: requests cluster data
- AI diagnosis → Piwi server: loads diagnosis context
- AI diagnosis → Git changes: uses git diff
- AI diagnosis → Configured LLM: requests explanation
- Engineer → Locator healing: reviews replacements
- Locator healing → Piwi server: loads locator evidence
- Locator matching engine → Playwright tests: matches locator chains
- Engineer → Cross-project analytics: reviews trends
- Cross-project analytics → Piwi server: loads analytics
- Engineer → Custom dashboards: configures dashboards
- Custom dashboards → Piwi server: loads dashboard data
- Engineer → Scheduled reports: manages reports
- Scheduled reports → Piwi server: requests report data
- Piwi server → Notifications: dispatches notifications
- Engineer → Desktop workflows: runs locally
- Desktop workflows → Piwi server: imports or submits runs
- Engineer → Issue tracker integrations: configures issue tracking
- Issue tracker integrations → Piwi server: requests integration actions
- Engineer → REST and OpenAPI: calls API
- REST and OpenAPI → Piwi server: serves API requests
- Engineer → MCP server: asks test health
- MCP server → Piwi server: queries platform