Upload Test Pattern
Use deterministic fixture files and assert server-side result, not just UI success toasts.tests/files/upload.spec.ts
Download Test Pattern
Validate filename and file size to catch empty or malformed downloads.tests/files/download.spec.ts
Validation Cases You Should Not Skip
- Oversized files are rejected with clear error text.
- Invalid type (
.exe, wrong MIME) is blocked. - Malformed CSV or JSON shows row-level error details.
- Duplicate uploads are idempotent or clearly prevented.
- Upload cancellation leaves no partial server records.
Keep Upload Tests Stable
- Avoid random fixture data unless uniqueness is required.
- Use a small fixture for smoke tests and a large one for stress tests.
- Clean up created records by exact IDs after test completion.
Stably Features to Use for File Workflows
- Store storage credentials, import endpoints, and size limits in Stably Environments.
- Run high-parallel browser coverage on Stably Cloud for faster feedback.
- Schedule heavier large-file suites with Scheduled Test Runs during off-hours.
- Route failures to Slack/email with Alerts & Notifications so ingestion breakages are surfaced quickly.
- Use Stably Test Reporter artifacts (traces/screenshots) to debug flaky upload timing and download corruption.