<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Model-Based Testing on Rohit Jha</title><link>https://www.rohitjha.dev/tags/model-based-testing/</link><description>Recent content in Model-Based Testing on Rohit Jha</description><generator>Hugo</generator><language>en-US</language><copyright>© Rohit Jha. Articles licensed under CC BY-SA 4.0 unless noted.</copyright><lastBuildDate>Sun, 13 Sep 2026 20:35:34 +0530</lastBuildDate><atom:link href="https://www.rohitjha.dev/tags/model-based-testing/index.xml" rel="self" type="application/rss+xml"/><item><title>From Property-Based Testing to Model-Based Testing</title><link>https://www.rohitjha.dev/blog/model-based-testing-in-go/</link><pubDate>Sun, 13 Sep 2026 00:00:00 +0000</pubDate><guid>https://www.rohitjha.dev/blog/model-based-testing-in-go/</guid><description>&lt;p&gt;In my previous post on &lt;a href="https://www.rohitjha.dev/blog/property-based-testing-in-go/"&gt;property-based testing in Go&lt;/a&gt;, I generated values and checked properties such as serialization round trips and stable event IDs. Each generated value was one test case.&lt;/p&gt;
&lt;p&gt;Many of the failures I care about in distributed systems depend on history instead. Each operation in a booking system may pass its own unit tests while the lifecycle still mishandles a sequence such as:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;create
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;confirm
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cancel
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;confirm
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The last confirmation should be rejected. Other failures need less obvious histories: a retry applies an effect twice, a delayed command reopens a cancelled booking, or a rejected command changes state before returning an error.&lt;/p&gt;</description></item></channel></rss>