Launching TestFlows Machine: self-service deterministic simulation testing environment Read the post

Journal about testing

Deep dives into deterministic hypervisors, simulation testing, test design, combinatorial coverage, behavior models, and formal methods.

Case studies

Making Bombadil Exclaim: libvoidstar dlopen successful!

Did you know that Bombadil tries to reach for the star? Given the mysterious fellow he is, one would expect so. A voidstar, to be exact, and whether he reaches it depends on where he runs. When Bombadil starts, it tries to load a library, /usr/lib/libvoidstar.so. If the library is not there, Bombadil runs as it would locally on your laptop and makes every decision itself. If it is there, Bombadil draws its random values from the library, and tells it the moments when the program it tests reaches a new state and the results of the properties it checks. When it finds the library, Bombadil says so on its standard error with one line: libvoidstar dlopen successful! In Why Run Bombadil in a Deterministic Hypervisor?, it never printed that line. In this post, we look at what Bombadil does with the library, and how we got it to exclaim that line inside TestFlows Machine.

Vitaliy Zakaznikov Deterministic simulation
Read more

Case studies

Why Run Bombadil in a Deterministic Hypervisor?

Bombadil is a property-based testing tool for web and terminal UIs. It allows you to describe how your application should behave and what actions can be taken to interact with it using a TypeScript specification. Bombadil uses this specification to explore your application, selecting and performing actions based on its current state while checking your properties along the way. You can run it in your local development environment, in CI, or inside Antithesis. Naturally, we also wanted to see how it would run inside Machine, our deterministic hypervisor behind the TestFlows Machine simulation testing environment. Inside Antithesis, though, Bombadil runs differently because it is integrated with their fuzzer. What we can do is run Bombadil much as you would run it locally, but deterministically.

Vitaliy Zakaznikov Deterministic simulation
Read more

Deterministic hypervisor

So We Did Write a Deterministic Hypervisor

Almost two years ago, which in the age of AI is a long time, we set out to achieve what back then seemed to be an unachievable goal: to write our own deterministic hypervisor. Why? Well, maybe because that would make you a cool systems engineer. No, it was because, after working on designing memory chip testing solutions in the semiconductor industry and then on testing real-time operating systems, we knew that anything software can do still has its limits, but this was a clear path to get closer to hardware again. Nonetheless, the challenge was interesting, and the need for an affordable solution was clear.

Vitaliy Zakaznikov Deterministic simulation
Read more

Deterministic hypervisor

A Deterministic Hypervisor: How Many vCPUs Can You Run?

Production 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.

Vitaliy Zakaznikov Deterministic simulation
Read more

Deterministic hypervisor

A Deterministic Hypervisor: Is Execution Really Deterministic?

When we tell people that a replay in a deterministic hypervisor is the same run, the first question is always the same: really? Bit for bit? It is a fair question, because it is a strong promise. The short answer is that execution is deterministic on a CPU compatible with the one the run was recorded on, and that you don’t have to take our word for it, because you can check it yourself. This post explains why a recording belongs to its original CPU, what the state of a machine actually consists of, and how TestFlows Machine confirms that a replay reaches the same state, using a small example that boots Linux and prints 256 random bytes from /dev/random.

Vitaliy Zakaznikov Deterministic simulation
Read more

Case studies

Is It Really Fixed? Confirming a JuiceFS Fix in a Deterministic Hypervisor

Back in August, JuiceFS 1.3.1 in our cloud silently started to return different bytes than we wrote, and unfortunately we had to switch to a different storage solution. A few weeks later, a JuiceFS user 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 wrong reads on the version we had used, replay it exactly, and then run the same test against the fixed release with added fault injection.

Vitaliy Zakaznikov Deterministic simulation
Read more

Case studies

Running Jepsen in a Deterministic Hypervisor: A Stale Read That Replays Exactly

Jepsen is a well-known framework used for finding bugs in distributed databases, and its approach is simple to describe. A control node drives a cluster over SSH, runs operations against it while a nemesis partitions the network, kills processes or skews clocks, and then a checker decides whether the history it recorded could have happened on a correct system. What Jepsen doesn’t promise is that a failure it finds will happen again, because the cluster runs on real machines with real scheduling and real timing, so the next run takes a different path. We wanted to see what happens when the whole Jepsen setup runs inside a deterministic hypervisor, and whether a failure it catches can be replayed exactly.

Vitaliy Zakaznikov Deterministic simulation
Read more

Deterministic simulation

Introducing TestFlows Machine: Self-Service Deterministic Simulation Testing Environment

A self-service deterministic simulation testing (DST) environment for developers and AI coding agents has been a long time coming, and today we’re introducing TestFlows Machine to make that vision a reality. Because for many teams, deterministic simulation testing has changed how some of the most reliable software systems are built and tested. It gives you control over software execution, lets you inject failures, and makes runs reproducible, enabling you to investigate bugs that might otherwise take days to reproduce, or never show up again at all. However, getting there has usually meant walking a steep path that starts with building a custom system yourself, specific to your project, or diving into the development of a deterministic hypervisor for a more generic approach. That takes specialized knowledge, infrastructure, and a significant investment, and most teams would rather spend that time and tokens on their own software. And our vision is different.

Vitaliy Zakaznikov
Read more

Behavior models

Testing Super Mario Using a Behavior Model Autonomously (Part 1)

Autonomous testing is one of the most powerful approaches for exploring vast state spaces in complex systems. Rather than manually writing test cases for every scenario, autonomous systems can systematically explore millions of states, discovering edge cases that human testers would never think to check.

In this two-part follow-up, we’ll continue the Super Mario Bros. testing series by implementing the autonomous testing approach presented by Antithesis, where they autonomously play and beat the game.

Vitaliy Zakaznikov
Read more

Behavior models

Testing Super Mario Using a Behavior Model Autonomously (Part 2)

In Part 1, we built an autonomous system that beat all four levels of Super Mario Bros. without any human guidance. We treated the exploration as a mutation-based Genetic Algorithm, and it worked: the system discovered winning paths by exploring, replaying, and mutating input sequences. It found shortcuts, navigated complex enemy patterns, and even uncovered unexpected behaviors like the Level 4 collision bug. However, the exploration only validated one dimension of correctness: Mario’s progress. Our fitness function measured how far Mario advanced (x-position, level completion, and time), but the exploration couldn’t tell us whether the game actually behaved correctly. Did Mario’s velocity follow expected constraints? Were jumps causally justified? Did falling only occur when Mario lacked ground support? We had no way to know. This shows that autonomous testing by itself is not enough. To address this problem, we need a way to actually check state correctness. What we need is to plug in a behavior model!

Vitaliy Zakaznikov
Read more

Behavior models

Testing Super Mario Using a Behavior Model (Part 1)

The classic game Super Mario isn’t just fun to play—it has also become a favorite system for testing and analysis. In a blog post, Antithesis showed how their system that includes a deterministic hypervisor can autonomously play Super Mario and explore its vast state space. This kind of exploration is powerful for surfacing unexpected states, but it leaves one question unanswered: does the game behave correctly in every one of those states?

In this multi-part series, we tackle that challenge. Our approach is to apply a behavior model that captures the game’s intended mechanics—movement, physics, and collision detection—and use it as a framework for systematic testing. With this model, we can go beyond searching for the winning state: we can check that Super Mario behaves as it should in every explored state.

Vitaliy Zakaznikov
Read more

Behavior models

Testing Super Mario Using a Behavior Model (Part 2)

When testing complex stateful systems like Super Mario, behavior models can be your secret weapon. Think of them as property-based testing on steroids. The game world is vast, with countless combinations of player positions, velocities, physics states, and environmental conditions. This complexity makes it impractical to write classical test cases that cover any significant portion of the state space. At best, such tests can only form a sanity suite.

Imagine Mario sprinting through a level, collecting coins, and leaping over pits. Each action he takes depends on a myriad of factors: his speed, the timing of his jumps, his momentum and inertia, and even the layout of the level itself. Writing individual test cases for each scenario—like we showed in Part 1—would be like trying to count every grain of sand on a beach.

Vitaliy Zakaznikov
Read more

Test design

Writing Test Programs — Not Just Tests

Have you ever found yourself fighting your test framework? Wasting hours searching for the right plugin just to run a test conditionally or in a dynamic loop? If so, you’re not alone. The problem might not be your tests, but the dominant “runner mentality” that governs them. For years, the software testing landscape has relied on this model. We diligently write tests as passive objects, only to hand them over to a separate runner that dictates their execution. This approach, popularized by frameworks like Pytest and many others, certainly has its merits. Runners offer convention over configuration, and features like auto-discovery make it incredibly easy for beginners to get started. They provide a standardized way to execute tests, which is valuable. However, this convenience comes at a cost.

Vitaliy Zakaznikov
Read more

Test design

Stop Bashing Bugs – It's All Your Fault!

You’re running your tests, and there it is again — a red light, a failing check, you’ve found another bug. You sigh, roll your eyes, and maybe, if you are a tester, you mutter something about “the devs”, or if you are a dev, well, there is nobody to blame but yourself. But what if I told you… the bug isn’t the problem?

In fact, that little bug might be your system’s most honest state. And the truth is, it’s not the bug’s fault that you don’t want it — it’s yours!

Inspired by the first BugBash 2025 software reliability conference organized by Antithesis, this post is a lighthearted and (hopefully) helpful take on why bugs deserve a little more love — or at least, a little less blame.

Vitaliy Zakaznikov
Read more

Formal methods

What Do Condition, Proposition, Predicate, Property, and Invariant Really Mean?

In software testing, you often hear terms like “condition,” “proposition,” “predicate,” “property,” and “invariant”—but what do they really mean? In this article, we’ll break each of them down by defining them in relation to the states and state transitions that make up state machines. After all, software programs are, at their core, state machines. To aid understanding, we’ll use a well-known puzzle: the Die Hard water jug problem as our reference system. To understand these terms, we will first define what a state is, what a sequence of states is, and how a system can be represented as a mathematical formula. As a bonus, we’ll also define what an assertion means.

Vitaliy Zakaznikov
Read more

Formal methods

Transforming Testing Behavior Models into Formal Models

Most software systems do not come with formal models. However, formal models are invaluable for constructing comprehensive test suites based on atomic propositions and for verifying the correctness of a system’s behavior using tools like TLA+.

In the previous article, Testing Simple Train Control System Using Its Formal Description, we explored how a formal model can be used to create a behavior model, which, in turn, was used to calculate expected results for tests. However, in real-world applications, the inverse process—deriving a formal model from a behavior model developed during testing—is even more powerful.

In this article, we’ll explore exactly that process: how a testing behavior model can be transformed into a formal model. This approach opens up another dimension in understanding and testing software systems.

Vitaliy Zakaznikov Behavior models
Read more

Formal methods

Testing Simple Train Control System Using Its Formal Description

In our previous post, Decoding Formal Description of a Simple Train Control System, we examined how to interpret a formal model defined through a Kripke structure for a simple train control system—the Ceiling Speed Monitoring Controller (CSMC). Now, we’re taking the next step by using this model to build a powerful test suite to verify an AI-generated Python implementation of the controller.

With AI tools like ChatGPT increasingly involved in code generation, rigorously testing this code is essential. So, we’ll develop the test suite and see how good the AI-generated code really is.

Vitaliy Zakaznikov
Read more

Formal methods

Decoding Formal Description of a Simple Train Control System

In scientific research on software testing, you often come across papers filled with complex mathematical descriptions. Formal mathematics is commonly used in academia because it offers a precise way to describe how a system should behave in various situations, ensuring all possible cases are accounted for. However, for many testers, the math in these papers can feel overwhelming and difficult to apply to everyday testing work.

Terms like “Kripke structures,” “atomic propositions,” and “equivalence classes” might sound abstract and unfamiliar. However, these concepts aren’t as intimidating as they seem. They’re simply tools that help us think more systematically about a system, allowing us to create test cases that cover all the important behaviors.

Vitaliy Zakaznikov
Read more

Formal methods

Using Atomic Propositions and Equivalence Classes (Part 1)

Atomic propositions and equivalence classes offer a practical solution for making testing manageable when dealing with large or infinite input domains. While these concepts are widely used in formal verification—such as in Exhaustive Model-Based Equivalence Class Testing by W. Huang and J. Peleska, 2013, from which we’ll borrow the formal definition of equivalence classes—they are also extremely useful in everyday testing tasks.

In this two-part post, we explore how atomic propositions and equivalence classes help us select “representative values” when input spaces are large. These representative values group inputs that behave equivalently, enabling thorough system testing without needing to cover every possible input within each group. Given that atomic propositions and equivalence classes are commonly used in formal verification, we also look at the formal mathematical notation that defines these concepts.

Vitaliy Zakaznikov Combinatorial testing
Read more

Formal methods

Using Atomic Propositions and Equivalence Classes (Part 2)

Building on the foundations from Part 1 🛸, where we introduced atomic propositions and equivalence classes as mathematically rigorous techniques, this part applies these concepts in practice. Here, we’ll explore how to account for internal states, carefully select specific input values, and use a combinatorial sketch to cover all equivalence classes effectively.

Vitaliy Zakaznikov Combinatorial testing
Read more

Combinatorial testing

Combinatorial Testing: Writing Behavior Model

Combinatorial testing significantly increases the test coverage of software systems, achieving levels of thoroughness that are unattainable with traditional test suites focusing on individual scenarios or limited combinations of user actions. However, combinatorial testing introduces the notorious test oracle problem—how to determine or compute the expected behavior for every possible combination of user actions.

The survey “The Oracle Problem in Software Testing: A Survey” provides an excellent overview of this issue, highlighting that deriving or even knowing the correct outcomes for complex combinations is often not straightforward. A common approach to solve this is by developing a behavior model that can compute expected outcomes for given system behaviors. Yet, many testers have never encountered the oracle problem, as they primarily deal with single combination tests. Fewer still have created or even understand what a behavior model entails.

To demystify behavior models, we will explore the development of such a model for a simple stateful system: a memory function that allows users to write, read, or erase data. We’ll illustrate how to apply combinatorial testing to this function and develop a behavior model from scratch to verify expected results.

Vitaliy Zakaznikov Behavior models
Read more

Combinatorial testing

Sketching Combinations for Combinatorial Tests

Writing combinatorial tests usually requires that the author of the test plans for combinatorial testing upfront. This requires that all the combination variables and their values are identified and combined with the code that creates possible combinations and loops through each one of them. However, it would be nice to simplify the process and enable testers to write combinatorial tests in a manner that is as close as possible to a test that checks just one combination. This is where combinatorial Sketches come in. A combinatorial sketch allows a tester to write combinatorial tests in an intuitive way without worrying about variable identification, calculation of combinations, and any explicit loops.

1
2
3
4
5
6
7
8
9
@TestSketch(Scenario)
@Flags(TE)
def test_add(self):
values = {0, 1, math.inf, math.nan, 1 / 3, 2**-200, 2**200}
sign = {1, -1}
check_add(
a=either(*values, i="a") * either(*sign, i="sign_of_a"),
b=either(*values, i="b") * either(*sign, i="sign_of_b")
)
Vitaliy Zakaznikov
Read more

Combinatorial testing

Combinatorial Testing: The Introduction

According to the US National Institute of Standards and Technology’s (NIST) page on Combinatorial Testing, combinatorial testing can reduce costs for software testing, and its applications in software engineering can be significant. This is not surprising, as combinatorial testing is the cornerstone of any type of software testing. In its simplest form, one can think of it as finding the correct combination for a padlock. But instead of looking for a combination that opens the lock, the quality assurance team looks for combinations that lead to a violation of one or more requirements—the bugs. The technique is simple and universal, and in theory, it provides the most sought-after feature in testing, which is complete test coverage.

Vitaliy Zakaznikov
Read more

Test design

BDD or Not to BDD, or TDD, or Even ATDD: How Does It Affect Your QA Team?

How do software development processes such as behavior-driven development (BDD), test-driven development (TDD), or even acceptance-test-driven development (ATDD) affect the quality assurance team? To answer this question, we need to first note that all these terms end with “development” and not with “quality assurance”. But could we define behavior-driven quality assurance (BDQA), test-driven quality assurance (TDQA), or even acceptance-test-driven quality assurance (ATDQA)? If so, what would be the difference between them? Well, it would depend on the definitions of a behavior, a test, and an acceptance test.

Vitaliy Zakaznikov
Read more

Combinatorial testing

Get Your Software Covered Using Covering Arrays

For software systems with any non-trivial number of parameters, exhaustively testing all possible combinations of parameter values is not feasible. For example, if we have 10 parameters (k = 10) that each have 10 possible values (v = 10), the number of all possibilities is vk=1010=10billionv^k=10^{10} = {10}_{billion}, thus requiring 10 billion tests for complete coverage.

Vitaliy Zakaznikov
Read more

Test design

Working With Requirements Just Like With Code

“Requirements are the starting point of any design”, this is a quote from the presentation given by Nicholas D. Kefalas, who is a senior technical officer at Sikorsky Aircraft/Lockheed Martin. In this article, we’ll explore how you can work with requirements just like with code and look at a simple example of specifying requirements for a Google Calculator web application. While most people will agree with the quote above, somehow it is not applied or scarcely applied to the commercial software development process. We are developing too fast, and it seems like there is no time to think about the functionality that we are developing, much less write it down

Vitaliy Zakaznikov
Read more

Test design

Making Your Tests Better or How to Break Your Tests Into Steps

Writing tests is not as easy a task as it may seem at first glance. In many cases, writing a good test can be as hard as writing good application code. While readability and maintainability are both desirable features in application code, they are not always required. For tests, on the other hand, readability and maintainability are a must.

Vitaliy Zakaznikov
Read more
  1. · Case studies Making Bombadil Exclaim: libvoidstar dlopen successful! Vitaliy Zakaznikov 9m
  2. · Case studies Why Run Bombadil in a Deterministic Hypervisor? Vitaliy Zakaznikov 10m
  3. · Deterministic hypervisor So We Did Write a Deterministic Hypervisor Vitaliy Zakaznikov 10m
  4. · Deterministic hypervisor A Deterministic Hypervisor: How Many vCPUs Can You Run? Vitaliy Zakaznikov 7m
  5. · Deterministic hypervisor A Deterministic Hypervisor: Is Execution Really Deterministic? Vitaliy Zakaznikov 12m
  6. · Case studies Is It Really Fixed? Confirming a JuiceFS Fix in a Deterministic Hypervisor Vitaliy Zakaznikov 9m
  7. · Case studies Running Jepsen in a Deterministic Hypervisor: A Stale Read That Replays Exactly Vitaliy Zakaznikov 4m
  8. · Deterministic simulation Introducing TestFlows Machine: Self-Service Deterministic Simulation Testing Environment Vitaliy Zakaznikov 10m
  9. · Behavior models Testing Super Mario Using a Behavior Model Autonomously (Part 1) Vitaliy Zakaznikov 15m
  10. · Behavior models Testing Super Mario Using a Behavior Model Autonomously (Part 2) Vitaliy Zakaznikov 11m
  11. · Behavior models Testing Super Mario Using a Behavior Model (Part 1) Vitaliy Zakaznikov 18m
  12. · Behavior models Testing Super Mario Using a Behavior Model (Part 2) Vitaliy Zakaznikov 26m
  13. · Test design Writing Test Programs — Not Just Tests Vitaliy Zakaznikov 7m
  14. · Test design Stop Bashing Bugs – It's All Your Fault! Vitaliy Zakaznikov 5m
  15. · Formal methods What Do Condition, Proposition, Predicate, Property, and Invariant Really Mean? Vitaliy Zakaznikov 19m
  16. · Formal methods Transforming Testing Behavior Models into Formal Models Vitaliy Zakaznikov 11m
  17. · Formal methods Testing Simple Train Control System Using Its Formal Description Vitaliy Zakaznikov 10m
  18. · Formal methods Decoding Formal Description of a Simple Train Control System Vitaliy Zakaznikov 26m
  19. · Formal methods Using Atomic Propositions and Equivalence Classes (Part 1) Vitaliy Zakaznikov 24m
  20. · Formal methods Using Atomic Propositions and Equivalence Classes (Part 2) Vitaliy Zakaznikov 12m
  21. · Combinatorial testing Combinatorial Testing: Writing Behavior Model Vitaliy Zakaznikov 19m
  22. · Combinatorial testing Sketching Combinations for Combinatorial Tests Vitaliy Zakaznikov 5m
  23. · Combinatorial testing Combinatorial Testing: The Introduction Vitaliy Zakaznikov 4m
  24. · Test design BDD or Not to BDD, or TDD, or Even ATDD: How Does It Affect Your QA Team? Vitaliy Zakaznikov 4m
  25. · Combinatorial testing Get Your Software Covered Using Covering Arrays Vitaliy Zakaznikov 4m
  26. · Test design Working With Requirements Just Like With Code Vitaliy Zakaznikov 20m
  27. · Test design Making Your Tests Better or How to Break Your Tests Into Steps Vitaliy Zakaznikov 4m