<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Testing on Rohit Jha</title><link>https://www.rohitjha.dev/tags/testing/</link><description>Recent content in 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>Mon, 01 Jan 0001 00:00:00 +0000</lastBuildDate><atom:link href="https://www.rohitjha.dev/tags/testing/index.xml" rel="self" type="application/rss+xml"/><item><title>0x0019 - Property-Based Testing in Go: From Round Trips to System Invariants</title><link>https://www.rohitjha.dev/blog/property-based-testing-in-go/</link><pubDate>Tue, 28 Jul 2026 00:00:00 +0000</pubDate><guid>https://www.rohitjha.dev/blog/property-based-testing-in-go/</guid><description>&lt;p&gt;I&amp;rsquo;ve encountered types that serialized and deserialized without error, yet came back different. Nothing crashed and the serialized data looked valid. The round trip had changed the value.&lt;/p&gt;
&lt;p&gt;The serializer passed the examples I had written but violated an invariant for a value I had not chosen. Example-based tests are still useful because they document specific cases well. Property-based testing (PBT) states what must hold across a domain, then generates inputs and shrinks failures to smaller counterexamples.&lt;/p&gt;</description></item></channel></rss>