How can we help you today? How can we help you today?

How can I force my build to fail when any unit tests fail?

My build definition uses a DLM Automation 2 "Test" step, and is setup to publish results. This all works nice, except I'd like the build to fail if any of the tests fail.

Any suggestions how to achieve this?

Thanks in advance
MckMurray
0

Comments

5 comments

  • Rob C
    Sorry to hear you're having this problem.

    Which automated build system are you using? TeamCity, Jenkins, Bamboo, etc?
    Rob C
    0
  • MckMurray
    Hi Rob, I'm using VS Team Services build.
    MckMurray
    0
  • Rob C
    Thanks for the information. I've just tried a test step in VSTS with a failing test and I'm getting the same thing - the step is marked as successful even though there is a failing test. I've filed a bug report with reference SQLREL-145 and I'll try to keep you updated.
    Rob C
    0
  • Rob C
    We've just released an updated version of the VSTS Build plugin that will fix this problem. As you're using VSTS then it should get updated automatically.

    Any TFS 2015 users will have to download the new version of the plugin from the VSTS marketplace.
    Rob C
    0
  • MckMurray
    Thanks Rob, for the quick fix!
    MckMurray
    0

Add comment

Please sign in to leave a comment.