Scaling Go Testing with Contract and Scenario Mocks
funnelstory.ai·5h·
🛡️Error Handling
Preview
Report Post

Browsing the /r/golang subreddit, you might get the impression that "mock" is a dirty word.

I was recently reading a thread on testing strategies and was surprised by the intensity of the anti-mock sentiment. The arguments were visceral:

Avoid mocks like the plague.

Mocks are like payday loans. Convenient. You say “expect this method to be called with args X and Y, return Z”. Seems cheap. But the loan shark quickly starts charging interest.

At FunnelStory, we see it differently. We’ve learned to love mocks—not as a shortcut, but as the only way to meaningfully build and maintain a complex application as a small team (with no dedicated QA).

We manage a complex dist…

Similar Posts

Loading similar posts...