According to this Microsoft article on VS2015 there should be a "Run tests after every build" option in the test explorer. There is not. Any idea how to enable it?
I am running VS2015 Update 2, but perhaps there are some additional settings I need to enable?
The referred article in your question has a note on the availability on that feature:
Warning
Running unit tests after every build is supported in Visual Studio Enterprise.
I use Community at home and Professional at work and don't have that feature in either of them.
I am using Visual Studio 2017 Professional and I really want to run tests after build, a feature is only available in Visual Studio Enterprise and currently in Visual Studio 2019 Professional Preview as well. Visual Studio 2019's IntelliSense doesn't do "code completion" well, so I still mainly use Visual Studio 2017.
A work-around to run tests after build in VS 2017 is to run the test from the command line using dotnet vstest
.
Simply create a batch file to run dotnet vstest [Your Test Project].dll
and add to Project Properties > Build Events > Post-build event command line: call $(ProjectDir)YourBatchFile.bat > Run the post-build event: On successful build
.
Below is a sample Output
after the build:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With