User Guides
Testing and E2E
Validate functionality locally and in CI with inspector-driven end-to-end checks.
Validation layers
A practical quality model for this project has four layers:
- Lint for style and framework rules.
- Typecheck for contract safety.
- Unit tests for service behavior.
- Inspector-based E2E for integration behavior.
Local baseline
Run this baseline before opening a PR:
pnpm lint
pnpm typecheck
pnpm test
pnpm buildLocal MCP E2E run
Run full MCP E2E scenarios:
pnpm e2e:mcpWhat the E2E script validates
The script validates practical behavior, including:
- Permission matrix boundaries.
- Safe update conflict handling.
- Lease contention behavior (when supported).
- Comment and export flows.
- Membership roundtrip flows (when IDs are configured).
- Cleanup best-effort rollback.
Useful E2E environment variables
| Variable | Purpose |
|---|---|
OUTLINE_API_KEY | Required to run E2E against Outline |
OUTLINE_BASE_URL | Cloud or self-hosted endpoint |
OUTLINE_E2E_RUN_WRITE | Enable or disable write scenarios |
OUTLINE_E2E_COLLECTION_ID | Fixed target collection (optional) |
OUTLINE_E2E_EXPORT_COLLECTION_ID | Export scenario target |
OUTLINE_E2E_MEMBER_COLLECTION_ID | Membership scenario target |
OUTLINE_E2E_MEMBER_USER_ID | User membership scenario |
OUTLINE_E2E_MEMBER_GROUP_ID | Group membership scenario |
If OUTLINE_E2E_COLLECTION_ID is not provided, the script can create and clean a temporary collection when write mode is enabled.
CI behavior
CI includes an optional E2E job.
- The E2E job runs only when repository secret
OUTLINE_API_KEYexists. - If the secret is not configured, CI validation still runs and E2E is skipped.
- Default CI recommendation is read-focused mode (
OUTLINE_E2E_RUN_WRITE=false) unless you have an isolated test workspace.
Recommended CI setup
Configure these in GitHub:
- Secret:
OUTLINE_API_KEY - Optional variables:
OUTLINE_BASE_URL,OUTLINE_E2E_RUN_WRITE,OUTLINE_E2E_COLLECTION_ID,OUTLINE_E2E_MEMBER_COLLECTION_ID,OUTLINE_E2E_MEMBER_USER_ID,OUTLINE_E2E_MEMBER_GROUP_ID