Sometimes you want to be 100% sure your HTTP(s) client works exactly like it promises. That means you'll need tests. But what kind of? Just one real-life example: file downloading. How are you going to simulate connection lost, noisy network, broken data and all that weird network incidents? It could be done, partially, with the standalone HTTP servers. But they should be configured and have 100% uptime to use them in the continuous integration. Yes, we have mocks. They are unbeatable warriors of business logic testing. But, remember, we want to check everything, in fact, we just want to go through the real Client App <---> Network <---> Server App path.
That what I'm going to talk about in this article: we'll create a test which starts embedded HTTP(S) server (configured with our own HTTP handler) and runs the network-enabled code.
That what I'm going to talk about in this article: we'll create a test which starts embedded HTTP(S) server (configured with our own HTTP handler) and runs the network-enabled code.