<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>refactoring on Arrans Technical blog</title><link>https://arran4.github.io/blog/tags/refactoring/</link><description>Recent content in refactoring on Arrans Technical blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>technicalblog123@arran4.com (Arran Ubels)</managingEditor><webMaster>technicalblog123@arran4.com (Arran Ubels)</webMaster><copyright>Arran Ubels. This work is licensed under a &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License&lt;/a>.</copyright><lastBuildDate>Fri, 02 Oct 2026 11:55:00 +1000</lastBuildDate><atom:link href="https://arran4.github.io/blog/tags/refactoring/index.xml" rel="self" type="application/rss+xml"/><item><title>Large Go Tests Should Read Like Scenarios</title><link>https://arran4.github.io/blog/post/2026/051-large-go-tests-should-read-like-scenarios/</link><pubDate>Fri, 02 Oct 2026 11:55:00 +1000</pubDate><author>technicalblog123@arran4.com (Arran Ubels)</author><guid>https://arran4.github.io/blog/post/2026/051-large-go-tests-should-read-like-scenarios/</guid><description>A long test is not automatically a bad test. End-to-end and integration scenarios sometimes need substantial setup and several assertions.
The problem begins when the test body stops explaining the behaviour and becomes mostly mechanics: temporary files, archive writers, mock HTTP routing, hashes, cleanup, environment restoration, and repeated if err != nil blocks.
The standard I want is: the top level of a test should read like a scenario even when the machinery underneath it is complicated.</description></item></channel></rss>