Reliability testing for event-driven backends.

Faultline schedules HTTP deliveries to a local service and checks the resulting state. Use it to test duplicate events, delivery order, and concurrency.

Quickstart

Concurrent duplicate delivery

Download scenario YAML
./faultline run examples/concurrent-duplicate.yaml

Buggy backend

race-buggy
2 events · 2 orders FAIL · exit 3
execution     outcome=completed exit_code=3
client        peak_in_flight=2 max_batch_dispatch_spread_ns=5375
verification  verdict=FAIL http_status=200 read_complete=true
Full CLI output
execution     outcome=completed exit_code=3
deliveries    planned=2 attempted=2 headers_received=2 reads_completed=2 status_mismatches=0
plan          concurrency=2 seed=- initial_delay_ns=0 between_batches_ns=0
client        peak_in_flight=2 max_batch_dispatch_spread_ns=5375
verification  verdict=FAIL http_status=200 read_complete=true
assertions    matched=1 mismatch=1 missing=0 not_evaluated=0

seq  id  batch  delay_ns  dispatch  dispatch_ns  complete  complete_ns  duration_ns  http_status  read_complete  status_check  error_code
1    1   1      0         2         40167        1         1397250      1357083      201          true           matched       -
2    2   1      0         1         34792        2         1410250      1375458      201          true           matched       -

Fixed backend

race-fixed
2 events · 1 order PASS · exit 0
execution     outcome=completed exit_code=0
client        peak_in_flight=2 max_batch_dispatch_spread_ns=16416
verification  verdict=PASS http_status=200 read_complete=true
Full CLI output
execution     outcome=completed exit_code=0
deliveries    planned=2 attempted=2 headers_received=2 reads_completed=2 status_mismatches=0
plan          concurrency=2 seed=- initial_delay_ns=0 between_batches_ns=0
client        peak_in_flight=2 max_batch_dispatch_spread_ns=16416
verification  verdict=PASS http_status=200 read_complete=true
assertions    matched=2 mismatch=0 missing=0 not_evaluated=0

seq  id  batch  delay_ns  dispatch  dispatch_ns  complete  complete_ns  duration_ns  http_status  read_complete  status_check  error_code
1    1   1      0         2         28208        1         646500       618292       201          true           matched       -
2    2   1      0         1         11792        2         660458       648666       200          true           matched       -

Both backends return successful HTTP responses for both deliveries. The state assertion checks whether those two deliveries created exactly one order.

Local report inspector

Inspector documentation

Inspect the same runs with faultline ui. The timeline shows client dispatch and completion.

Faultline inspector showing two overlapping client deliveries and a FAIL verification verdict for the buggy backend.
Buggy backend · FAIL View full size
Faultline inspector showing two overlapping client deliveries and a PASS verification verdict for the fixed backend.
Fixed backend · PASS View full size