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-CoreProduction software rarely runs on a single CPU. A database sizes its thread pools by the number of CPUs it finds, the Linux kernel keeps per-CPU queues and caches, and locks behave differently when two CPUs contend for them. Software tested on one CPU is tested on a configuration it will probably never run on. That is why we made TestFlows Machine able to have many vCPUs, so that Linux and the software under test see a multi-CPU server just like the one they run on in production, while keeping every run deterministic. So how many vCPUs can you run? Spoiler: up to 64 in one machine. In this post we show what that looks like and what it costs. ...
Test programs, steps, combinatorial coverage, behavior models, and more.
Read all posts