Skip to main content
Glama
test-refactor.mdβ€’2.46 kB
--- summary: 'Review Test Refactor Task List guidance' read_when: - 'planning work related to test refactor task list' - 'debugging or extending features described here' --- # Test Refactor Task List The read-only automation suites are steadily moving away from `swift run` subprocesses and into the new in-process harness (`Support/InProcessCommandRunner.swift` plus `Support/TestServices.swift`). Drag, space, app, window CLI, dock, menu, and dialog read suites now run hermetically. The remaining work below will finish the migration so the entire β€œsafe” matrix can execute without touching live macOS services. ## 1. Complete the Command Harness Rollout - βœ… **ScrollCommandTests.swift**, **SwipeCommandTests.swift**, **MoveCommandTests.swift**, **PressCommandTests.swift**, **AppCommandTests.swift**, **DragCommandTests.swift** All four suites now run via `InProcessCommandRunner` with Fixture-driven `TestServicesFactory` contexts. - βœ… **RunCommandTests.swift**, βœ… **ListCommandTests** (CLI variants) Command coverage moved to the harness by wiring `StubProcessService`, `StubScreenCaptureService`, and in-memory application/window fixtures. - ~~**AnalyzeCommandTests.swift**~~ Removed (no standalone `analyze` CLI command existsβ€”`image --analyze` already has coverage inside `ImageCommandTests`). Reintroduce only if a dedicated `AnalyzeCommand` is added to the CLI. ## 2. Extend/Adjust Test Stubs - βœ… Automation stubs now record calls/results for `scroll`, `swipe`, `press`, `moveMouse`, wait-for-element, etc., enabling hermetic CLI coverage. - βœ… Added `TestServicesFactory.AutomationTestContext`, injectable `StubProcessService`, and configurable `StubScreenCaptureService` to keep new harness suites concise. - TODO: continue identifying repetitive fixture construction in remaining suites and upstream them into `TestServicesFactory`. ## 3. Documentation & Guardrails - Update `swift-subprocess.md` and any onboarding docs once the harness covers all read suites so new contributors know to use the in-process approach by default. - Consider adding a lightweight lint (or test) that fails if anyone reintroduces `PeekabooCLITestRunner`, keeping the suite hermetic. ## 4. Verification - After each conversion, re-run the safe matrix (`pnpm run test:safe`) and the read automation pass (`PEEKABOO_INCLUDE_AUTOMATION_TESTS=true RUN_AUTOMATION_READ=true swift test`) via tmux to ensure no regressions.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/steipete/Peekaboo'

If you have feedback or need assistance with the MCP directory API, please join our Discord server