Testing overview
Trust the bindle, test the journey — without a cloud account until you want one.
HoBo collapses a lot of “special testing tools” into one idea: every boundary is typed and contract-backed, so you can point it at a different mode (live, mock, replay, bridge, shadow, fault) without rewriting the app. The patterns below are deliberate product features, not ad-hoc test helpers.
Mental model
| Idea | What it buys you |
|---|---|
| Contracts bound shape | Consumer-driven expectations; providers can grow without breaking consumers |
| Boundary modes | Same production code path, different routing (mock / live / replay / bridge / shadow / fault) |
| EffectSpec | Pure work isolates with zero infra; domain I/O drives automatic mocks |
| ResilienceProfile | Fault-injection guided by the contract; never retries policy denials or terminal failures |
| Event log | Replay-equals-live; inspection without re-running side effects |
| SQLite journal | Real durability semantics offline (CAS, fencing, atomic effects) |
Layers (read in this order)
- Unit tests & boundaries — unit tests; boundaries auto-mock from contract examples.
- Aggregates & CQRS — pure decide, fenceToken, conflict vs invariant.
- Contracts & PACT — consumer/provider executable contracts; subset matching.
- Effect-aware isolation — pure vs domain-effect harness modes.
- Dual fixtures — pure path vs effect path from the same metadata.
- Durable EventStore — stream-head CAS, fencing, positions, restart.
- Migration fixtures — legacy schema → current, fail-closed integrity.
- Queue, timer, outbox — lease fences, once-after-restart timers.
- Deployment rehearsal —
hobo plan, local lane, Gatekeeper. - Bridge modes — live/mock/bridge/replay/shadow/fault.
- Chaos & availability — session faults, synthetics, shadow.
- Property & model — journal ≡ reference model.
- Behavior & Cucumber — Gherkin evidence, not live E2E.
- Benchmarks — catch algorithmic regressions.
- Conformance & golden — port suites + deploy golden gate.
- Anti-patterns — what not to do.
What you should not do
- Hand-write long-lived mocks that drift from contracts — use contract examples / effect harness mocks.
- Treat
COUNT(*)stream length or multi-writer shared SQLite as “the real” store — the product uses stream heads and single-owner partitions. - Retry
policy.Decideddenials or terminal WIT failures in tests “to be resilient” — that is a bug in the product model. - Run broad full-repo test sweeps to discover code — search first, then narrow package tests.
Related
- Architecture — EventStore default, package map.
- The Bridge — local/remote development on the same modes.
- Reference: effects · EventStore · contracts