7

I have a muted test that is failing in a build and its seems to be causing the entire build to fail even though:

  • Failure Conditions for the build only has "at least one test failed" ticked
  • "the build process exit code is not zero" is unticked

I am expecting the build in the screenshot below to be green not red. What am I doing wrong?

Note in screenshot below:

Build problems: VSTest.console execution failure

. The build step itself is the Visual Studio Tests runner that is bundled since TC 9.1.

enter image description here

Jack Ukleja
  • 13,061
  • 11
  • 72
  • 113
  • A muted failure is still a failure. I'm not too surprised the behaviour is as you describe. Of course, I also see the logic in what you want. Maybe you can raise this with JetBrains at https://youtrack.jetbrains.com/. – sferencik Nov 02 '15 at 09:22
  • Yes but my understanding is its the Failure Conditions that determine what fails the build. A muted test does not count as a failed test according to their docs. – Jack Ukleja Nov 02 '15 at 10:20
  • Did you manage to resolve this? – Ian1971 May 19 '16 at 09:30
  • Sadly no. Try upvoting the question to see if it might get a responses ;-) – Jack Ukleja May 20 '16 at 01:07
  • I have the same problem with muted tests, but in Python Pytest. Fun facts: * my build configurations worked for months without problem, then one day they started to not ignore exit code 1 caused by a muted test * even if I switch off all failure conditions, the test run fails complaining about exit code 1 – Gerzson Jan 31 '22 at 09:01

2 Answers2

0

If you don't check the box "Use custom TeamCity test logger for real-time reporting" it works ok. So to me this is a bug TeamCity should look in to.

Ian1971
  • 3,666
  • 7
  • 33
  • 61
0

I had a similar problem when I upgraded Unit Test project .net framework 4.6.1 to 4.8 new style .net sdk.

Solved my problem to add current .net framework folder (net48) to the assembly path as below go to project>>settings change Configuration parameters:

Path.To.UnitTestAssembly : Unit Test Project Path \bin\Release to bin\Release\net48

crokk
  • 91
  • 1
  • 2