xUnit v3 - How to display the seed in the test output ? #3320
-
I sometime encounter failed tests on CI/CD pipelines that don't fail on my local machine surely because the running order of the tests is different. The build is Docker based and use the "dotnet test" command. The installed package are :
Should I set a logging level or others parameters ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The seed is printed in the headers when diagnostic messages are enabled. When using
When using
|
Beta Was this translation helpful? Give feedback.
The seed is printed in the headers when diagnostic messages are enabled.
When using
dotnet run
, there is one variable which influences how easy it is to see the seed.For native xUnit.net UX, it just shows up:
For Microsoft Testing Platform UX, you need to pass
--xunit-info
to see the xUnit.net messages:When using
dotnet test
, there are several variables which can influence how easy it is to see the seed.For VSTest mode, with .NET SDK 9 and using Windows Terminal, it should just show up:
For VSTest mode, with .NET SDK 8 or older (or if you're not using Windows Terminal), it will only show up if you enable normal verbosity with the console logger with
--logger "console;verbo…