I have a simple batch file that calls MSBuild to build my Visual Studio solution, then runs the solution's NUnit tests, and then uses Wix to create an MSI. However I can't figure out how to stop the build process if any of the unit tests fail.
I tried the following:
nunit-console ../test.nunit
echo %ERRORLEVEL%
But regardless of whether unit tests passed or failed, %ERRORLEVEL% is always 0. Is there another way to easily determine whether any of the tests failed? I am using NUnit 2.5.9.