Build was successful even though some tests were failed on DNX

justin.yoojh's Avatar


17 Jan, 2016 05:47 AM

Hi, Team.

I'm building an ASP.NET 5 MVC 6 application on DNX environment. As currently AppVeyour test setup for automatic discovery doesn't support DNX yet, I'm running tests using PowerShell by iterating all test projects and running the dnx test command inside my PS script.

However, even if any of test fails, the build is still successful which is not supposed to be. Please find the link that I provide as an example:

Could you let me know how to setup test properly?



  1. 1 Posted by justin.yoojh on 17 Jan, 2016 10:00 AM

    justin.yoojh's Avatar

    PowerShell script that I'm running to perform unit tests can be found here:

  2. Support Staff 2 Posted by Feodor Fitsner on 17 Jan, 2016 06:01 PM

    Feodor Fitsner's Avatar

    You should check for $LastExitCode:

    dnx test
    if($LastExitCode -ne 0) {
  3. 3 Posted by justin.yoojh on 18 Jan, 2016 11:53 AM

    justin.yoojh's Avatar

    Thanks! Got it working.

  4. justin.yoojh closed this discussion on 18 Jan, 2016 11:53 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac