Unit testing OWIN applications using TestServer Unit testing a OWIN application (pipeline) can be as simple as calling WebApp.Start<T>() on a Startup class. For example here is a simple OWIN pipeline: You can have this piece of test code in your unit test library and execute the necessary tests. But one drawback with this approach is every time you call WebApp.Start<T>, the test starts a real HTTP listener server and executes the code. What if there is a way by which you can avoid starting a real HTTP server every time, but still unit test the OWIN application pipeline. If that’s what you are looking for, Microsoft.Owin.Testing package solves this problem for you. Microsoft.Owin.Testing package: This package contains a TestServer...(read more)
Go to the complete details ...