The Best Mock in the World: Examining Tools for Generating Mocks in Go
summary
A comparison of Go interface mock generators—Mockery, Gomock, and Minimock—using practical examples to show each tool's advantages, disadvantages, and ease of use. The talk also covers best practices for writing unit tests with mocks in Go.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 5:45Mock generation
- 9:55Expectation typing
- 13:28Call limits
- 17:21Call order checks
- 21:36Working with aliases
- 25:53Async tests
- 31:17Fixing bad tests
- 33:28Tool comparison
- 34:30Summary and recommendations
- 35:38Q&A
related talks
50mThe best mock in the world: examining mock generation tools in Go
07mHow to Mock Fellow Gophers While Avoiding HR
48mClimbing the Testing Pyramid: From Real Service to Interface Mocks in Go
04mMocking in Go: Using interfaces for fun and profits
39mMockolo: Efficient Mock Generator for Swift
01h 32mTesting in Go: 101
23mMocking of mocks. A deep dive into the mock module
36mTo Mock or Not to Mock
