outline-mcp
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:

  1. Lint for style and framework rules.
  2. Typecheck for contract safety.
  3. Unit tests for service behavior.
  4. Inspector-based E2E for integration behavior.

Local baseline

Run this baseline before opening a PR:

pnpm lint
pnpm typecheck
pnpm test
pnpm build

Local MCP E2E run

Run full MCP E2E scenarios:

pnpm e2e:mcp

What 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

VariablePurpose
OUTLINE_API_KEYRequired to run E2E against Outline
OUTLINE_BASE_URLCloud or self-hosted endpoint
OUTLINE_E2E_RUN_WRITEEnable or disable write scenarios
OUTLINE_E2E_COLLECTION_IDFixed target collection (optional)
OUTLINE_E2E_EXPORT_COLLECTION_IDExport scenario target
OUTLINE_E2E_MEMBER_COLLECTION_IDMembership scenario target
OUTLINE_E2E_MEMBER_USER_IDUser membership scenario
OUTLINE_E2E_MEMBER_GROUP_IDGroup 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_KEY exists.
  • 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.

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