My co-worker pointed out that IIS Express would not work for us.
In his words,
Running IIS express from the test might work, but it has a few drawbacks:
- It will be harder to debug – when running a test, we’ll have to attach a second visual studio to the iis express process to debug.
- It will be harder to manage – we will need to make sure we stop iis express after the tests stop running – or we’ll need a separate clean-up process. Otherwise, we’ll end up with many instances of iis express running.
- If multiple CI builds are running in TFS, how would we manage the ports with multiple IIS express versions running?
His points are valid and sinks the idea of using IIS Express to run the Web Worker roles.
He points to a postby Chad Meyers who spun up MVC by, for the most part, mocking ASP.NET.
Our web roles are wrapped in an IHttpHandler. This gives us the flexibly to test the code outside of Azure. In theory, we can spin up an instance of ASP.NET, using Chad Meyers’s method in the above post and drop in our web role HttpHandlers and test our code.