nunit / nunit3-vs-adapter

NUnit 3.0 Visual Studio test adapter for use under VS 2012 or later
https://nunit.org
MIT License
203 stars 105 forks source link

FEATURE REQUEST: nunit adapter discovery "tracing" (in additon to debugging) #1134

Open kasperk81 opened 11 months ago

kasperk81 commented 11 months ago

f.ex. google "nunit failed to load" and you will find all kinds of hacks, workarounds and speculations with no definite solution.

today we have few options to attach the debugger to the adapter https://docs.nunit.org/articles/vs-test-adapter/Debugging.html, which requires GUI debugger and symbols to be present. we don't want any of that to find out the "reason" why nunit is failing to "load" "already discovered" tests..

what we need is something like dotnet test -- NUnit.TraceExecution=true so it prints out all kinds of stuff to output stream that adapter is doing and help us spotting (and fixing) the issue. that will help when running tests in headless (no GUI) environments like containers or CI.

the dotnet team has, e.g. COREHOST_TRACE environment variable https://github.com/dotnet/runtime/blob/main/docs/design/features/host-tracing.md#trace-routing which spits out this kind of information.

OsirisTerje commented 11 months ago

I do agree.

We already have some of that in place,

dotnet test -- NUnit.DumpXmlTestResults=true  NUnit.Verbosity=5

The first of these dumps the test results (there is also one for discovery), whereas the Verbosity=5 is the start of the command you ask for.

But, it can be expanded, so I'll mark this as a good idea.