How do I run integration tests on an IIS Express site?

Is there a good way to run .NET MSTest tests in Visual Studio against a site in the same solution hosted in IIS Express? I used to always host sites in IIS. I would like to be able to "Run Test" in Visual Studio and automatically launch the site in IIS Express before running the tests. I see no direct way to do this; what am i missing?

(I can manually start IIS Express and then run tests, and I can start the site in Visual Studio and then run the tests, but I would like the site to start and then run tests when I just run the test.)

+3


source to share


1 answer


John Kerner advises that you need to use the IIS Express API to start it manually in the AssemblyInitialize method. Not a very good solution.



+1


source







All Articles