tag:help.appveyor.com,2012-11-13:/discussions/problems/3985-build-was-successful-even-though-some-tests-were-failed-on-dnxAppVeyor: Discussion 2018-10-19T08:17:42Ztag:help.appveyor.com,2012-11-13:Comment/389391182016-01-17T10:00:32Z2016-01-17T10:00:32ZBuild was successful even though some tests were failed on DNX<div><p>PowerShell script that I'm running to perform unit tests can be
found here:</p>
<p><a href="https://github.com/GetScissorhands/Scissorhands.NET/blob/dev/run-tests.ps1">
https://github.com/GetScissorhands/Scissorhands.NET/blob/dev/run-tests.ps1</a></p></div>justin.yoojhtag:help.appveyor.com,2012-11-13:Comment/389391182016-01-17T18:01:34Z2016-01-17T18:01:34ZBuild was successful even though some tests were failed on DNX<div><p>You should check for <code>$LastExitCode</code>:</p>
<pre>
<code>dnx test
if($LastExitCode -ne 0) {
$host.SetShouldExit($LastExitCode)
}</code>
</pre></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/389391182016-01-18T11:53:13Z2016-01-18T11:53:13ZBuild was successful even though some tests were failed on DNX<div><p>Thanks! Got it working.</p></div>justin.yoojh