4

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've always hosted sites in IIS proper before. I'd like to be able to "Run Test" in Visual Studio and have the site automatically start in IIS Express before the tests are run. I don't see a straightforward 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 tests, but I would like the site to start and then have the tests run when I simply run the test.)

Patrick Szalapski
  • 7,020
  • 9
  • 49
  • 98

1 Answers1

1

John Koerner reports that you would need to use the IIS Express API to start it manually in an AssemblyInitialize method. Not a very good solution.

Community
  • 1
  • 1
Patrick Szalapski
  • 7,020
  • 9
  • 49
  • 98