Test Environment Document
Parent Document: TEST_PLAN.mdVersion: 1.2 | Date: January 5, 2026
9. Test Environment
9.1 Environment Overview
| Environment | Purpose | Data | Access |
|---|---|---|---|
| Development | Unit/integration testing | Synthetic, reset nightly | Dev team |
| Staging | Validation, UAT | Production-like | Dev, QA, stakeholders |
| Production | Live operations | Real user data | Authorized users |
9.2 Hardware Requirements
Development Workstations:
- MacBook Pro M1/M2 or equivalent PC
- 16GB RAM minimum
- 256GB SSD minimum
- Docker: 8GB RAM allocated
Cloud Infrastructure (Staging):
- Supabase Pro tier: 8GB database, 100GB storage
- Cloudflare Pages: Global CDN
- GitHub Actions: Auto-scaled runners
9.3 Software Requirements
Development Tools
| Software | Version | Purpose |
|---|---|---|
| Node.js | 20.x LTS | Runtime |
| pnpm | 9.x | Package manager |
| Docker Desktop | Latest | Local Supabase |
| Supabase CLI | Latest | DB management |
| Chrome | Latest | Primary browser |
| Firefox | Latest | Secondary browser |
Testing Tools
| Tool | Version | Purpose | License |
|---|---|---|---|
| Vitest | ^2.x | Unit testing | MIT |
| Playwright | ^1.40+ | E2E testing | Apache 2.0 |
| React Testing Library | ^14.x | Component testing | MIT |
| MSW | ^2.x | API mocking | MIT |
| axe-core | ^4.x | Accessibility | MPL 2.0 |
| Lighthouse CI | Latest | Performance | Apache 2.0 |
| k6 | Latest | Load testing | AGPL 3.0 |
| Snyk | Free tier | Vulnerability scanning | Proprietary |
9.4 Test Data
User Accounts
| Type | Email Pattern | Quantity |
|---|---|---|
| Standard User | test.user+{id}@dustac-test.com | 10 |
| Admin User | test.admin+{id}@dustac-test.com | 2 |
| UAT User | 3-5 |
CSV Test Files
| File | Description | Rows | Size |
|---|---|---|---|
valid-single-device-daily.csv | 1 device, 24 hours | 288 | 15 KB |
valid-multi-device-weekly.csv | 5 devices, 7 days | 10,080 | 500 KB |
large-dataset-500k.csv | Performance testing | 500,000 | 25 MB |
utf8-bom.csv | BOM encoding test | 100 | 5 KB |
missing-columns.csv | Invalid file | 100 | 4 KB |
invalid-dates.csv | Malformed timestamps | 100 | 5 KB |
Test Data Commands
bash
# Generate synthetic data
npm run generate:test-data -- --devices 5 --days 30
# Seed test database
npm run seed:test-db
# Reset test database
npm run reset:test-db9.5 Network Configuration
Development:
- PostgreSQL:
localhost:54322 - Supabase Studio:
http://localhost:54323 - API Gateway:
http://localhost:54321
Staging:
- Supabase:
https://[project-id].supabase.co(TLS 1.3) - Cloudflare:
https://staging.dustac.app
9.6 Local Supabase Setup
bash
# Start local Supabase
pnpm supabase:start
# Check status
pnpm supabase:status
# Stop Supabase
pnpm supabase:stop
# Generate types
pnpm supabase:types9.7 CI/CD Integration
GitHub Actions Workflow:
yaml
# .github/workflows/test.yml
name: Tests
on: [push, pull_request]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- run: pnpm install
- run: pnpm test:unit
e2e-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- run: pnpm install
- run: pnpm exec playwright install
- run: pnpm test:e2e9.8 Environment Variables
bash
# .env.local
VITE_SUPABASE_URL=your-project-url
VITE_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-key9.9 Browser Support Matrix
| Browser | Version | Support Level |
|---|---|---|
| Chrome | 90+ | Full |
| Firefox | 88+ | Full |
| Safari | 14+ | Full |
| Edge | 90+ | Full |
| IE 11 | - | Not supported |
9.10 Security Configuration
Test Environment Security:
- RLS policies enforced
- JWT authentication required
- Test accounts use synthetic credentials
- No production data in test environments
- Audit logging enabled
Related Documents:
- TEST_PLAN.md - Main test plan
- TEST_EXECUTION.md - Execution process
- TEST_APPENDICES.md - Templates