Why Your Go Tests Are Slow (and What to Do About It)
Most slow Go test suites aren't slow because of slow tests. They're slow because of slow structure: sequential execution, redundant setup, and shared state that prevents parallelism.
Thinking about Go testing: patterns, trade-offs, and the ideas behind gotest.
Most slow Go test suites aren't slow because of slow tests. They're slow because of slow structure: sequential execution, redundant setup, and shared state that prevents parallelism.
testify/suite to gotestA practical guide to migrating Go test suites from testify/suite to gotest. Before-and-after examples, automated migration with gotest migrate, and what needs manual review.
Most Go test frameworks use reflection to find suites at runtime. gotest takes a different approach: AST-based code generation with overlay filesystem injection.
Test names like TestCreateUser_WhenEmailInvalid_ReturnsError are hard to scan. BDD-style labeled subtests and spec output turn your tests into living documentation.
Every growing Go project needs shared test infrastructure: databases, caches, containers. A look at fixture patterns from global vars to DAG-based lifecycle management.
func TestXGo's testing simplicity is a feature. Until your project outgrows it. A look at why flat test functions, table-driven tests, and subtests each solve part of the problem, and what happens when you need all three at once.
Go's testing package is one of the best things about the language. But it leaves gaps that every growing project eventually hits. The motivation behind gotest and the five principles that shaped its design.