Search code examples
asp.netvisual-studiovisual-studio-2012

How to run a test at the same time a web project is being debugged?


In some of the solutions we have ASP.NET/WCF web project and a test project. Some of the tests run against ASP.NET development web server using http://localhost:port/.... In VS2010 while the ASP.NET/WCF web project was being debugged, the test runner could run the tests and if there were any breakpoints in web project, the debugger would break the execution. This seems to have been disabled/removed in VS2012.

When the ASP.NET/WCF web project is debugged (launched by pressing F5 or via attach process), both the TEST->Run and TEST->Debug sub-menus are disabled. In VS2010 only Test->Debug sub-menus were disabled while Test->Run sub-menus were still enabled. We use this way to easily debug the services within the web project. Any way to get that behavior back or workaround?

Debugging While Running on ASP.NET Development Server doesn't seem to be applicable to VS2012 or at least I can't get it to work.


Solution

  • I ended up writing a quick addon. It turns out that like VS2012, VS2012 test runner can also run the tests when the web project is being debugged. It is just that menu options are disabled.