Documents
06 - Testing Guide
06 - Testing Guide
Type
Document
Status
Published
Created
May 26, 2026
Updated
May 26, 2026
Updated by
Dosu Bot

06 - Testing Guide#

Helmor uses a multi-layer testing strategy. Each tier has its own framework, and a combined command runs everything.

Quick reference#

bun run test # All layers
bun run test:frontend # Frontend only (Vitest)
bun run test:sidecar # Sidecar only (Bun test)
bun run test:rust # Backend only (Cargo test)
bun run test:e2e # End-to-end (Playwright, WebKit)
bun run test:frontend:watch # Frontend watch mode
bun run test:rust:update-snapshots # Update Rust Insta snapshots

Frontend tests#

DetailValue
FrameworkVitest 4.1 with jsdom
Utilities@testing-library/react
Test files~126
LocationCo-located with source (*.test.ts, *.test.tsx)

Frontend tests cover component rendering, hook behavior, state management logic, and query key generation. Mock Tauri's invoke for backend calls.

Sidecar tests#

DetailValue
FrameworkBun test (built-in)
Test files~11
Locationsidecar/**/*.test.ts

Sidecar tests validate protocol parsing, provider adapters, and event serialization.

Rust backend tests#

DetailValue
FrameworkCargo test
Snapshot testingInsta (YAML format)
Test files~12
Locationsrc-tauri/src/**/*.rs (inline #[cfg(test)] modules)

Backend tests focus on database operations, workspace lifecycle, Git helpers, and pipeline transformations. Insta snapshots capture expected outputs — run bun run test:rust:update-snapshots after intentional changes.

End-to-end tests#

DetailValue
FrameworkPlaywright 1.59
BrowserWebKit only
Spec files3
Locatione2e/

E2E tests exercise the full app from UI interaction through backend and sidecar.

Writing new tests#

  • Place test files next to the code they test.
  • For frontend: use @testing-library/react and mock IPC boundaries.
  • For Rust: use inline #[cfg(test)] modules with Insta snapshots for complex outputs.
  • For sidecar: test protocol and adapter logic in isolation.