We use multiple build steps in our TeamCity configuration. One build step runs NUnit on our test project dll. If it fails some tests the build status is set to failed but the build step status may not be set to failed (even if process returns 1 – which usually corresponds to failed)!

We use TeamCity Professional 2017.1.3 with the following failure conditions for our configuration:


And we used the following setting in all subsequent build steps after the NUnit build step:


We had to change that setting to “Only if build status successful” (thanks to Ahmed on stackoverflow):


That way we can stop within one build configuration after unit tests fail and before we deploy :).

Post comment