Show Assert.Warn as Warning in test run with dotnet

We have a .net core project that is build on TeacmCity.

I have the following unit test:

 

When this runs locally (dotnet test / rider for example) the output is as expected:


 

However, when this runs on our TC pipeline, the test shows up as ignored:

Is there anything I can do to get this to show as a Warning in TeamCity?

1
3 comments

Hello Alex, 

Which Unit Testing framework are you using in your Build step? 

Thanks,

Guilherme

0
Avatar
Permanently deleted user

It's NUnit

0
Hello Alex,
 
TeamCity does not support the "Warning" status for tests and supports only the following statuses: 
  • Passed
  • Failed
  • Ignored
As an alternative you can use TeamCity service messages to send warnings to TeamCity via stdOut. You can find more about it here:
 
Guilherme
0

Please sign in to leave a comment.