Skip to content

Glossary: Go in Practice

Subtest; table test

Also written: t.Run, table-driven test

`t.Run(name, f)` runs one case on its own. A table test loops over a slice of cases, each as a subtest with its own fresh database.

Where the book teaches it

Related terms

t.TempDir; t.Cleanup; t.Helper; t.Context