~/talk

Testing in Go: from basic to advanced

Talkat Golang Piter 2019 · on Friday, 2019-11-01· [testing]
links:none on file
slides:none on file

Go testing techniques with runnable code: how to use t.Helper and t.Run subtests, table-driven tests and the common loop-variable bug that makes parallel subtests share the same value, and how that turned three 1s runs into 3s. Shows using -race to detect data races, build tags like // +build integration with -short to skip slow integration tests, how to implement global setup/teardown with TestMain, and forcing fresh runs with -count to bypass cached results.

AI-written summary · about

  1. 0:00Introduction to testing
  2. 3:21Basic test functions
  3. 8:30Table-driven tests
  4. 11:31Parallel test execution
  5. 14:46Race condition detection
  6. 18:04Test data management
  7. 19:50Black-box testing
  8. 21:38Integration testing
  9. 24:28Test flags and build tags
  10. 26:16Test setup and teardown
  11. 28:28Test caching in Go
  12. 29:30Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.