Posts

Showing posts with the label Software Mocking

Mocks? Stubs? Or Shims?

Image
If you’re building anything more complicated than, oh, a simple “ Hello World! ” app, odds are that you’re going to end up with dependencies (•). These dependencies can vary all over the place, from access to system resources (How d’you think the “ Hello World! ” actually got to your screen?), other components in your system, external resources, outside applications, and so much more. What’s worse is that • the dependencies might be under development too • even if they’re stable, you might not have everything necessary to access them (e.g., the auth framework to get at S3) • and even then, you might want to test specific responses that you can’t guarantee (it needs to always fail. Or succeed. Or randomly based on a PRNG) And that’s where  mocking  comes in, where you essentially fake your interactions with the dependencies, so that you can go about implementing  your  stuff without depending on, well, your dependencies. Which is all well and good, and actu...