# Smoke Test Plan

Critical paths only. Run after every deployment to verify the system is functional.

## Test: {test_name}

- **Endpoint/Page**: {METHOD} {/path} or {URL}
- **Description**: {what critical functionality this verifies}
- **Expected Response**: {status code, key fields in response body, page element visible}
- **Max Response Time**: {e.g., 2000ms}
- **Run After Deploy**: Yes

### Verification
```
Request:  {METHOD} {base_url}{/path}
Headers:  {required headers}
Body:     {request body if applicable}
Expect:   Status {code}, body contains "{key field or value}"
Timeout:  {max ms}
```

---

## Test: {test_name}

- **Endpoint/Page**: {METHOD} {/path}
- **Description**: {what this verifies}
- **Expected Response**: {expected result}
- **Max Response Time**: {e.g., 1000ms}
- **Run After Deploy**: Yes

### Verification
```
Request:  {METHOD} {base_url}{/path}
Expect:   Status {code}
Timeout:  {max ms}
```

---

## Smoke Test Checklist

| # | Test | Endpoint/Page | Expected | Max Time | Status |
|---|------|--------------|----------|----------|--------|
| 1 | Health check | GET /health | 200 OK | 500ms | — |
| 2 | Homepage loads | GET / | 200, title present | 2000ms | — |
| 3 | Auth works | POST /auth/login | 200, token returned | 1000ms | — |
| 4 | Primary API works | GET /api/{resource} | 200, data returned | 1000ms | — |
| 5 | Database connected | GET /health/db | 200, connected: true | 500ms | — |
| 6 | {critical path} | {endpoint} | {expected} | {time} | — |

## Run Instructions

```bash
# Run all smoke tests
{command to run smoke tests}

# Run against specific environment
{command} --env={staging|production}
```

## Failure Protocol

If any smoke test fails after deployment:
1. **Do NOT proceed** with further deployments
2. Check application logs for errors
3. If critical: initiate rollback (see deploy runbook)
4. If non-critical: assess impact, decide rollback vs. hotfix
