Summary
Currently the extension has unit tests (Zig comptime mock injection) and frontend has Jest tests, but there's no automated E2E pipeline that exercises the full stack: REAPER → extension → WebSocket → frontend. Regressions in the integration layer (state polling, command dispatch, subscription lifecycle) can only be caught manually.
Goal
A containerized test environment with a known REAPER project that runs a curated set of E2E tests against the real system. This guards against regressions and dramatically speeds up development confidence.
Architecture questions to investigate
REAPER in a container
- REAPER has a
-nosplash CLI flag and can run headless on Linux
- Linux build exists and works (ReleaseSafe, validated in CI — 84ebbe1, 8559fcf)
- Need to determine: can REAPER load a project and run the extension without a display? Xvfb or similar virtual framebuffer may be needed
- SWELL (Simple Windows Emulation Layer) handles the UI on Linux - may need X11 even for "headless" operation
- Alternative: macOS runner with REAPER installed (less portable but more realistic)
Known test project
- Curate a small .rpp with:
- A few tracks with known names, colors, volumes, pans
- Markers and regions at known positions
- Items with takes (for Scrap/Retake/Keep testing)
- FX chains with known parameters
- Tempo map with changes
- Pre-configured routing (sends/receives)
- Commit this fixture project to the repo under
test-fixtures/
Test runner
- Browser automation (Playwright or Cypress) connecting to the served frontend
- Or: direct WebSocket client in TypeScript/Zig that sends commands and asserts on subscription state - avoids browser overhead for backend-focused tests
- Hybrid approach: WebSocket-level tests for command/state coverage, Playwright for UI interaction tests (touch instruments, timeline gestures)
Existing infrastructure to build on
make test-e2e target already exists in the Makefile
- Extension test architecture uses comptime generics - E2E tests would complement this by testing the real REAPER API path that mocks can't cover
- CI already builds for Linux (GitHub Actions — 16a137d)
Suggested phased approach
Phase 1: WebSocket integration tests (no browser)
- Script that connects via WebSocket (websocat etc?), sends commands, asserts responses
- Run against a REAPER instance with a known project loaded
- Start with: transport state, track listing, command dispatch
- Can run locally first, containerize later
Phase 2: Containerized REAPER
- Docker image with REAPER + extension + test project pre-loaded
- Xvfb for display if needed
- GitHub Actions integration
- Smoke test: extension loads, WebSocket accepts connection, state is correct
Phase 3: Browser E2E
- Playwright tests against the served frontend
- Cover critical user flows: connect → see tracks → transport controls → Scrap/Retake/Keep → mixer adjustments
- Touch interaction simulation for instruments
Open questions
Summary
Currently the extension has unit tests (Zig comptime mock injection) and frontend has Jest tests, but there's no automated E2E pipeline that exercises the full stack: REAPER → extension → WebSocket → frontend. Regressions in the integration layer (state polling, command dispatch, subscription lifecycle) can only be caught manually.
Goal
A containerized test environment with a known REAPER project that runs a curated set of E2E tests against the real system. This guards against regressions and dramatically speeds up development confidence.
Architecture questions to investigate
REAPER in a container
-nosplashCLI flag and can run headless on LinuxKnown test project
test-fixtures/Test runner
Existing infrastructure to build on
make test-e2etarget already exists in the MakefileSuggested phased approach
Phase 1: WebSocket integration tests (no browser)
Phase 2: Containerized REAPER
Phase 3: Browser E2E
Open questions
(
reaper -nosplash test-fixtures/e2e-project.rpp- needs verification)