full-stack-screenshot-testing
Installation
SKILL.md
Full-Stack Screenshot Testing
Overview
Render frontend pages with a real backend (real DB, real business logic, zero mocks) and capture screenshots from a single Go test. The Go test is the sole orchestrator — it creates data, starts the API, serves the pre-built frontend, and drives a headless browser.
Core insight: A Go httptest.Server can serve both /api/v1/* (real handlers) and /* (pre-built SPA static files) on the same port. No process coordination, no dev server startup, no MSW.
When to Use
- Reviewing UI design with realistic data at every lifecycle state
- Iterating on frontend changes with fast feedback (build → screenshot → review → fix)
- Verifying that admin pages render correctly after backend/model changes
- Catching visual regressions across order states, error conditions, empty states
When NOT to use:
- Unit testing component logic (use Vitest)
- Testing user interactions/flows (use Playwright E2E)
- API contract testing (use Go integration tests)