- a declined payment, invalid parameter, or forbidden state is a deterministic outcome selected by a public request condition or an opaque scenario;
- high latency and a lost connection are environmental faults applied to an operation attempt; and
- asynchronous work is declared separately and is not a fault.
Need an exact catalog name or execution term? Use the Fault glossary.
Use the built-in HTTP catalog
Simile includes complete, provider-neutral HTTP faults with sensible defaults. Select only the faults the service needs:^ to subtract it. Exclusions apply to the complete configuration, so a
later positive selector cannot accidentally add the fault again:
http.slow delays a response by one second. http.response_lost completes and commits the
operation, then closes delivery before the response reaches the caller. Catalog entries compile
into the same self-contained artifact records as provider-authored faults; starting the service
does not fetch or resolve a remote catalog.
Defaults are optional, not restrictive. Override only the property that matters to the service:
1ms through 24h, using ms, s, m, or h.
An exact import keeps its catalog name, so scenarios and profiles refer directly to http.slow.
Use an alias when the same preset needs more than one configuration:
Define a custom fault
The initial action vocabulary is intentionally small. Define a custom fault when a catalog preset does not express the service’s public testing contract:before_response currently accepts delay; after_commit currently accepts disconnect.
Compilation rejects mismatched phase/action pairs. A delay must be from 1 millisecond through 24
hours. These narrow combinations make ordering explicit and prevent a transport label from quietly
changing service semantics.
Deterministic scenarios
Use a scenario when a test must reproduce the same disruption every time:inject is an exact contract operation ID. The referenced fault must exist. A scenario
may also select named outcomes, so one opaque test setup can choose a public service result and a
delivery failure without exposing a provider’s private decision tree.
createOrder commits and the connection is lost, a retry
with the same idempotency key returns the stored result normally. Simile stores the operation
outcome in the replay index, not the transport failure that affected its first delivery.
Bounded stochastic profiles
Use a profile to exercise resilience over a longer local or CI session:probabilityis per eligible attempt, from0.000001through1.faultsis a non-empty set of declared environmental faults.operationsis an optional list of contract operation IDs; omit it to cover all operations.max_consecutivedefaults to1and limits uninterrupted activations.cooldown_requestsdefaults to20and counts eligible clean attempts after that limit.seedis optional. When omitted, Simile creates a session seed and reports it at startup.
--output json includes
activeFaultProfile and faultSeed so CI can retain the same evidence without parsing human
output.
Profiles cannot name domain outcomes and currently support only transport-safe fault actions. This
is deliberate: random network adversity is useful; random business rejection makes an integration
test untrustworthy.
Runtime and adapter boundary
The runtime completes anOperationOutcome first, then returns an OperationExecution containing
an optional fault activation and a protocol-neutral transport plan. The replay store contains only
the outcome. simile-server owns the concrete HTTP behavior: sleeping before a response or ending
the response stream after commit.
That split lets future adapters implement the same plan without importing HTTP into the runtime,
and lets future fault actions grow without becoming response-selection rules.
Read Outcome fidelity for deterministic error selection,
Fault glossary for catalog names and terminology,
State, identity, and replay for retry semantics, and
Operation execution for the runtime pipeline.