Testing in Go with Ginkgo and Gomega
summary
Shows that adding Ginkgo and Gomega to Go testing gives a structured BDD DSL and powerful matchers used alongside standard testing and Testify to handle complex backend API tests (Go, MySQL, Kafka, Redis, Docker, Kubernetes). The team runs an ad-exchange serving thousands of requests per second and uses Ginkgo/Gomega in production for more than two years; tests become readable and suppress noisy output, but the testing tree, closures and async code introduce gotchas (loop variables, panics) that once cost days to debug. eventually/consistently matches
AI-written summary · about
chapters (34)
- 0:00Introduction
- 1:25Agenda
- 1:54Who is this talk for
- 2:28What options are there
- 5:38Assertion libraries
- 7:26API design
- 7:47Ginkgo
- 8:58When to start testing
- 10:14Why use a library
- 10:59Duplication
- 11:50Test pyramid
- 13:23Ginkgo and Gomega
- 15:23Setup routines
- 17:18Focus tests
- 18:21Control output
- 19:13Using it independently
- 19:49Matches
- 20:46Advanced functions
- 21:38Powerful matches
- 22:43Combine matches
- 24:21Transform matches
- 24:45Hidden type castings
- 26:01String consists
- 26:27Passing a result
- 27:05Passing a value not being initialized
- 28:20Loop variables
- 28:56Panic
- 29:28One line
- 29:41Asynchronous tests
- 30:40Avoiding asynchronous tests
- 31:21My personal experience
- 32:38Conclusion
- 33:27GitHub
- 33:49Thank you
