3 ms·
I know it's probably a losing battle at this point, but — Would you consider using the more correct terminology "Fake" instead of "Mock"? In software testing,
by zestyping 5y ago
I know it's probably a losing battle at this point, but —
Would you consider using the more correct terminology "Fake" instead of "Mock"?
In software testing, the two terms mean different things. A "fake" is a thing that takes the place of a service; you call it and it returns a fake result. A "mock" is a thing that enforces expectations of its caller; you specify a sequence of calls that you expect, then you run the caller and it verifies that the calls occurred in the manner and order expected. They are used for different purposes, and it's useful to have the clarity of two different terms for two different things.
In particular, it is usually a better testing practice to use fakes instead of mocks. But now there are some testing libraries that create mocks (and call them mocks) and other testing libraries that create fakes (and also call them mocks), which has confused the issue and made it harder to speak clearly about a fairly important testing strategy decision.
What HTTP Toolkit does is produce fake replies to HTTP requests. So "fake" is the best term for what it does, and thus I make this earnest plea to use that term to distinguish it from mocking, which it doesn't do.
- johnhenry 5y agohttp://xunitpatterns.com/Test%20Double.html http://xunitpatterns.com/Test%20Double.html