Concepts¶
Mental model¶
faultcore applies network faults at runtime to operations executed inside decorated functions.
Think in three layers:
Decorator layer: attach fault behavior to a function.
Policy layer: define reusable named profiles.
Runtime layer: execute process with interceptor to apply low-level effects.
When to use decorators directly¶
Use direct decorators when:
You need one-off behavior in a single test.
You want fast local experimentation.
When to use policies¶
Use policies when:
You need consistency across many tests.
You want scenario names like
mobile_3gorregional_outage.You want dynamic switching via thread-local context.
Fault family guide¶
Timing and QoS:
timeout,latency,jitter,rateLoss and instability:
packet_loss,burst_loss,correlated_lossTransport behavior:
connection_error,half_open,packet_reorder,packet_duplicateName resolution:
dnsPayload mutation:
payload_mutation
Typical rollout strategy¶
Baseline with deterministic faults.
Add one stochastic dimension at a time.
Promote to policy profiles once stable.
Validate with reports and operational metrics.