Failed tests launch with script does not fail the build

Jérémie Bertrand's Avatar

Jérémie Bertrand

03 Feb, 2015 05:41 AM

Hi,

I launch the test with test_script:
OpenCover.Console.exe -register:user -filter:"+[Pretzel.Logic]*" -target:"xunit.console.clr4.exe" -targetargs:"""src\Pretzel.Tests\bin\Release\Pretzel.Tests.dll"" /noshadow /appveyor" -output:coverage.xml
In order to have the code coverage.

But as you can see on my buid, one test have failed and the build is still considered as ok:
https://ci.appveyor.com/project/laedit/pretzel/build/0.2.1.68/tests

Is it normal with the test_script option?
Should I use another option to have the build failed if any test have fail?

Thanks for your amazing work! :)

  1. Support Staff 1 Posted by Feodor Fitsner on 03 Feb, 2015 06:05 PM

    Feodor Fitsner's Avatar

    Hi Jeremie,

    To decide if the build should be terminated AppVeyor relies on exit code. Seems like this command returns 0?

  2. 2 Posted by Jérémie Bertran... on 03 Feb, 2015 08:47 PM

    Jérémie Bertrand's Avatar

    Oh, ok.
    I understand, thanks for the tips.
    I will look with opencover then.

  3. 3 Posted by Jérémie Bertran... on 08 Feb, 2015 08:45 AM

    Jérémie Bertrand's Avatar

    Jus for info, the -returntargetcode parameter is the one needed.
    https://github.com/opencover/opencover/wiki/Usage#optional-arguments

  4. Jérémie Bertrand closed this discussion on 08 Feb, 2015 08:49 AM.

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

Keyboard shortcuts

Generic

? 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