Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Azure DevOps, how do I prevent failing unit tests from failing the build?

I have a build pipeline which contains a build task, a publish task, and a test task. There are some unit tests that fail, which is causing the whole build to fail.

How can I prevent this? I don't want to have to require 100% of my unit tests to pass just for the build to succeed...

like image 742
ekolis Avatar asked Aug 31 '19 21:08

ekolis


1 Answers

You can set the parameter "Continue on error" = true:

enter image description here

In yaml:

- task: VSTest@2
  inputs:
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'
  continueOnError: true
like image 72
Shayki Abramczyk Avatar answered Sep 19 '22 13:09

Shayki Abramczyk