<?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 gotest</title><link>https://mvrahden.github.io/go-test/tags/testing/</link><description>Recent content in Testing on gotest</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 06 Sep 2026 15:15:15 +0200</lastBuildDate><atom:link href="https://mvrahden.github.io/go-test/tags/testing/feed.xml" rel="self" type="application/rss+xml"/><item><title>Readable Go Tests with BDD-Style Subtests</title><link>https://mvrahden.github.io/go-test/blog/readable-tests-with-bdd/</link><pubDate>Wed, 08 Jul 2026 00:00:00 +0000</pubDate><guid>https://mvrahden.github.io/go-test/blog/readable-tests-with-bdd/</guid><description>&lt;p&gt;When a test fails in CI, the first thing you read is its name. And for most Go projects, that name looks like this:&lt;/p&gt;
&lt;div class="gotest-block"&gt;
 &lt;span class="gotest-label"&gt;go test -v output&lt;/span&gt;
 &lt;pre class="gotest-body"&gt;
=== RUN TestCreateUser_WhenEmailInvalid_ReturnsError
--- FAIL: TestCreateUser_WhenEmailInvalid_ReturnsError (0.01s)
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;You can decode it. &lt;code&gt;TestCreateUser&lt;/code&gt; is the subject, &lt;code&gt;WhenEmailInvalid&lt;/code&gt; is the condition, &lt;code&gt;ReturnsError&lt;/code&gt; is the expectation. But it takes a moment. And when you&amp;rsquo;re scanning twenty failures across five packages, those moments add up.&lt;/p&gt;
&lt;p&gt;This post looks at why Go test output is hard to read at scale, how BDD-style structure helps, and what it takes to turn test runs into something that reads like a specification.&lt;/p&gt;</description></item></channel></rss>