# Testing Agent Guide

## Backend

Run the default backend suite:

```bash
php artisan test
```

Run Pest directly (primary backend runner in this repo):

```bash
./vendor/bin/pest
```

Optional: `./vendor/bin/phpunit` is not the preferred entrypoint here because Pest owns the suite bootstrapping.

Useful targeted scripts:

```bash
composer run test:unit
composer run test:feature
composer run verify:backend
```

## Frontend / E2E (Playwright)

Run E2E tests:

```bash
npm run test:e2e
# or
composer run test:e2e
```

Run Playwright UI mode:

```bash
npm run test:e2e:ui
# or
composer run test:e2e:ui
```

Open the HTML report after a run:

```bash
npx playwright show-report
```

## Agent Verification Shortcut

Run all main checks (backend + frontend):

```bash
composer run verify:agent
```

Alternative from npm:

```bash
npm run verify:agent
```

## Artifacts and Logs

- Playwright HTML report: `playwright-report/`
- Playwright run artifacts (traces/videos/failure screenshots): `test-results/`
- Visual snapshot baselines (`toHaveScreenshot`): `e2e/__screenshots__/`
- Laravel logs: `storage/logs/laravel.log`
