> ## Documentation Index
> Fetch the complete documentation index at: https://p-bitm-2269ecee.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Testing

> Run the P-BitM CLI, backend, frontend, static, and deployment checks.

## CLI

From the repository root:

```bash theme={"system"}
python3 -m pytest tests
```

## Admin backend

```bash theme={"system"}
PYTHONPATH=server/backend python3 -m pytest server/backend/tests
```

## Campaign backend

```bash theme={"system"}
PYTHONPATH=server/backend-phishing/app \
  python3 -m pytest server/backend-phishing/tests
```

## Frontend

```bash theme={"system"}
cd server/frontend
npm ci
npm run lint
npm test
npm run build
```

Use `npm run lint:fix` to apply ESLint's safe automatic fixes, then rerun
`npm run lint` to confirm the result.

## Static and deployment checks

```bash theme={"system"}
python3 -m compileall cli server/backend server/backend-phishing/app
python3 scripts/release_checks.py
docker compose -f server/docker-compose.yml config
docker compose -f server/docker-compose-dev.yml config
git diff --check
```

Tests must use temporary storage and must not require a running production
stack. Add regression coverage for every security or lifecycle fix.
