Deterministic
Machine
Test and explore your programs in a deterministic machine for free. Get started in 5 minutes.
Deterministic
Test and explore your programs in a deterministic machine for free. Get started in 5 minutes.
Open-source
Python library for writing test programs.
Using the everything-is-code approach.
test.py
1 | from testflows.core import Scenario |
terminal
python3 ./test.py |
Race conditions, timing issues, and network failures show up once in a while, and almost never when you are looking for them. Machine runs your real, unmodified Linux x86_64 software, from a single binary to a Docker Compose project, in a machine that controls time, interrupts, random numbers and the thread schedule. Every run can be replayed exactly and branched from any point.
So instead of running a test thousands of times, you name the race and make it happen.
See a missed wakeup forced and fixed01
Every run is recorded as it executes. A replay repeats it exactly, to the instruction, as often as you like.
Replay02
Checkpoint the whole machine and fork a branch from any point. Each branch goes its own way while the original stays as it was.
Checkpoints and branches03
Hold a thread in a race window, fail the exact system call, or delay a packet, and make the machine produce the failure the code points at.
Steering programs04
Read registers, memory and the stack, set breakpoints and watchpoints, or run GDB inside the machine, at any point of any run.
Debugging05
Run the same interleaving against your fix. When it passes, you know the fix holds, not just that the failure has not shown up yet.
See an exampleAgents do the heavy lifting, while you stay in the loop and can see every step they take, repeat it, and take over at any point. Your agent drives Machine through the same machine client that you use, and the Python SDK gives both of you full programmatic control.
Install the Machine skill, ask your agent what Machine can do for your project, and it sets things up with you.
A complete deterministic simulation testing system manages recordings, checkpoints and branches, controls execution, injects faults, debugs failures and explores schedules, and makes all of it work together reliably. Machine provides the whole system and runs it for you as a cloud service.
Drive Machine from your terminal with the machine client, from your programs with the Python SDK, or let your coding agent drive it with the Machine skill. The same commands, either way.
machine sessions create first --cpus 2 |
import testflows.machine.v1 as machine |
mkdir -p ~/.claude/skills |
The TestFlows Framework and the Machine Python SDK are open source, and so are Machine's examples. The skill for coding agents is public on GitHub. Report issues, ask questions and share what you find.
Public repository
Programs that hold known bugs to try, the Python SDK, the Machine skill for coding agents, issues and Discussions.
testflows/MachineOpen source
The Python framework for writing test programs, with its examples, the handbook and the docs.
testflows/TestFlows-CoreBack in August, JuiceFS 1.3.1 silently corrupted data in our cloud, and unfortunately we had to stop using it. A few weeks later, after we switched to a different storage solution, someone reported a bug upstream that looked a lot like ours, and the fix shipped in JuiceFS 1.3.4 and 1.4.2. That left us with two questions. Was it really our bug? And is it really fixed? This post is about how we answered both by combining our AI coding agent and TestFlows Machine to reproduce the corruption on the version we had used, replay it exactly, and then run the same test against the fixed release with added fault injection. ...
Test programs, steps, combinatorial coverage, behavior models, and more.
Read all posts