4

I have created some unit tests for my C# web application. What I would like to do next, is to run the unit tests automatically, each time I build my application.

I understand that you have a "Run unit tests after build" option in Visual Studio 2015 Enterprise Edition, which will do just that. But unfortunately I have only the Professional edition, which seems not to offer this feature.

Is there some other way to to run unit tests automatically, when building the code using the Professional editon of Visual Studio 2015?

brinch
  • 2,544
  • 7
  • 33
  • 55
  • You could use something like [NCrunch](http://www.ncrunch.net/), although that is a paid-for addin for Visual Studio. It doesn't run the tests after build, but instead runs them continuously in the background as you type. – adrianbanks Jun 27 '16 at 22:18
  • 5
    Related: http://stackoverflow.com/questions/13498302/how-can-i-continuously-run-unit-tests-in-visual-studio-2012-professional – Asik Jun 27 '16 at 22:26
  • @Grannt Winney: I'm not absolutely sure. I just did a File -> New Project -> "Unit Test Project". So I would assume that's MSTest then. – brinch Jun 27 '16 at 22:26
  • @adrianbanks: I'd prefer a free solution if possible. – brinch Jun 27 '16 at 22:27
  • 1
    Not familiar with MSTest, but why not add a post-build event (either to the MSTest project or the project you want to test) which simply executes the MSTest project? This isn't optimal, since the test execution isn't well-integrated with the build, but it is often enough. – Eli Jun 28 '16 at 00:21

0 Answers0