3 ms·
You can mock networks all you want and you'll still cover only what you can think of. It will always break on the user's internet, because it's too diverse to
by nottorp 6y ago
You can mock networks all you want and you'll still cover only what you can think of.
It will always break on the user's internet, because it's too diverse to predict.
Doesn't mean you can't have some networking unit tests, just that you shouldn't believe in them too much.
Edit: you said services. You thinking of server? I'm thinking of clients.
- tremon 6y ago"mocking networked services" is exactly what you would do when testing clients. And it doesn't have to be a static mock. It's not too hard to inject a fuzzer in your mock service response, although that's probably left to a separate testing routine, and not part of your unit test setup. But if you have no mock for your network service, you can't fuzz it either.