SteGriff

Blog

Next & Previous

Unit/Integration testing a project which calls an ASP.Net MVC site

In Visual Studio, running Tests does not run your Startup Projects. This is a pain if you’re integration testing, and your client program calls an endpoint of your ASP.Net MVC or Web API site, because the site needs to be running, but isn’t.

It took me a long time to find a workaround, which is why I’m writing it here - I’ve shortened and amended the process from that answer.

Running an ASP.Net project simulatenously with your unit tests