# Testing Documentation

This section contains test scripts, test results, and testing documentation.

## 🧪 Test Scripts

### API Testing
- **[test-api-endpoints.sh](./test-api-endpoints.sh)** - Comprehensive API endpoint testing
- **[test-medication-api.sh](./test-medication-api.sh)** - Medication-specific API tests
- **[test-meds.sh](./test-meds.sh)** - Quick medication tests

### Integration Testing
- **[test-mvp-phase-2.7.sh](./test-mvp-phase-2.7.sh)** - Phase 2.7 MVP comprehensive tests
- **[solaria-test.sh](./solaria-test.sh)** - Solaria deployment testing
- **[check-solaria-logs.sh](./check-solaria-logs.sh)** - Log checking utility

### Quick Tests
- **[quick-test.sh](./quick-test.sh)** - Fast smoke tests

## 📊 Test Results

- **[API_TEST_RESULTS_SOLARIA.md](./API_TEST_RESULTS_SOLARIA.md)** - API test results from Solaria deployment

## 🚀 Running Tests

### Quick Smoke Test
```bash
./docs/testing/quick-test.sh
```

### Full API Test Suite
```bash
./docs/testing/test-api-endpoints.sh
```

### Medication API Tests
```bash
./docs/testing/test-medication-api.sh
```

### Phase 2.7 MVP Tests
```bash
./docs/testing/test-mvp-phase-2.7.sh
```

## 📋 Test Coverage

### Backend Tests
- ✅ Authentication (login, register, token refresh)
- ✅ User management (profile, settings)
- ✅ Permissions & shares
- ✅ Medications (CRUD, logging, adherence)
- ✅ Health statistics
- ✅ Security (rate limiting, session management)
- 🚧 Drug interactions (in progress)

### Test Types
- **Unit Tests**: Rust `cargo test`
- **Integration Tests**: API endpoint tests
- **E2E Tests**: Full workflow tests
- **Deployment Tests**: Post-deployment verification

## 📝 Test Notes

- All tests require MongoDB to be running
- Some tests require valid JWT tokens
- Solaria tests require VPN/connection to Solaria server
- Test data is isolated to prevent conflicts

---

*Last Updated: 2026-03-09*
