Skip to content

Developer testing

Run unit tests for all internal packages:

Terminal window
go test ./internal/... -v -timeout 5m -coverprofile=cover.out

Tests use database mocking and assertion libraries. Each package follows table-driven test patterns.

Integration tests require a real PostgreSQL and Redis instance (provided by Docker in local dev). Run them with the integration build tag:

Terminal window
go test -tags=integration ./internal/... -v -timeout 5m
Terminal window
go test ./... -v -timeout 5m -count=1

Integration tests use the same build tag:

Terminal window
go test -tags=integration ./... -v -timeout 5m

The dashboard uses Vitest with jsdom for unit and component tests:

Terminal window
# Watch mode
pnpm test
# Coverage report (lcov)
pnpm test:coverage

E2E tests use Playwright with Chromium. They require the API server to be running and a preview build of the dashboard:

Terminal window
pnpm test:e2e