# Testing Overview

> Run end-to-end tests with Playwright and unit tests with Vitest.

*Canonical: https://makerkit.dev/docs/nextjs-prisma/testing/overview*

---

This repo ships with Playwright for E2E tests and Vitest for unit tests.

## Quick Start

```bash
# Terminal 1
pnpm --filter web build:test
pnpm --filter web start:test

# Terminal 2
pnpm --filter web-e2e test:slow

# Unit tests
pnpm test:unit
```

`start:test` is a blocking server process, so run it in a separate terminal.

## Environment Setup

E2E tests require:

- PostgreSQL running
- `apps/e2e/.env`
- seeded data via global setup

## Common Pitfalls

- forgetting to start the app before E2E runs
- stale production test build
- port 3000 conflicts

---
