mocking-strategy-roster
Two orthogonal axes — strategy (microcks inprocess) × stack: the single place that resolves how a downstream dependency is mocked for an integration test.
When to use
- Before emitting downstream mock wiring — loaded by mock-integration-worker
- Determining whether to use a Microcks container (default) or an in-process test double (override)
- Adding a new stack adapter (add one row + one
mocking-{strategy}-{stack}skill, zero other edits)
Entry contract
- Run prompt (may carry a strategy/library override — highest priority)
.github/instructions/skraft.instructions.mdfieldstesting.mocking.strategyandtesting.mocking.library(read by tool call, never recalled)
Exit contract
- Resolved adapter link (e.g. mocking-microcks-dotnet or mocking-inprocess-dotnet)
- OR:
status: blockedpayload withtypeandcontextif the strategy/library/stack is unsupported
Invariants
- Read overrides by tool call — never assume from recall; if the file is absent, fall through to default
microcks - Cascade: explicit prompt >
skraft.instructions.mdtesting.mocking.*> defaultmicrocks - Unknown strategy → stop — emit
status: blockedwithtype: unsupported_mocking_strategy; never invent a wiring - Unknown library when
strategy: inprocess→ stop — emitstatus: blockedwithtype: unsupported_mocking_library - Adding a strategy or stack = one adapter + one table row — zero edits to this skill or the worker
Why this shape
Centralising the routing decision prevents each worker from encoding a mocking approach. The two axes (strategy and stack) are independent: a new stack plugs in without touching the strategy logic, and vice versa.
« Replace a component that the SUT depends on with a test-specific equivalent. » — Meszaros, G., xUnit Test Patterns, 2007.
Adapter table
| Strategy | Stack | Adapter | Status |
|---|---|---|---|
| microcks | .NET | mocking-microcks-dotnet | supported |
| inprocess | .NET | mocking-inprocess-dotnet | supported |
| microcks | Java | (mocking-microcks-java not yet provided) | NOT SUPPORTED |
| inprocess | Java | (mocking-inprocess-java not yet provided) | NOT SUPPORTED |
Allowed customisation
- Per-strategy/stack adapters added independently (no edits to this skill or the worker)
See also
- mocking-microcks-dotnet — Default (Microcks) adapter for .NET
- mocking-inprocess-dotnet — Override (in-process) adapter for .NET
- software-engineer — DELIVER agent that triggers the worker that loads this skill