mix lockstep.replay (Lockstep v0.1.0)

Copy Markdown View Source

Print a saved Lockstep trace as a human-readable schedule, or re-run a specific test function under the recorded schedule.

Print mode

mix lockstep.replay --trace traces/foo.lockstep

Prints metadata + the formatted schedule. Includes a ready-to-paste recipe for reproducing the bug from a fresh test run.

Run mode

mix lockstep.replay --trace traces/foo.lockstep \
                    --run "MyApp.RaceTest.lost_update_body" \
                    --file test/examples/foo_test.exs

Loads --file (so test modules become available; mix compile doesn't compile test files), then calls Lockstep.Replay.run(&Module.function/0, trace_path). Run mode raises Lockstep.BugFound if the bug reproduces (the expected outcome) or Lockstep.ReplayDivergence if the user code is nondeterministic.