dotnet test > is there a way to show list of tests ran in console?

Viewed 8051

When running dotnet test, is there a way of showing a list of all tests ran in console instead of some output file?

Would be ideal to see a list like this in console:

x test1
 test2
 test3
x test4

instead of just overall test statistics (ran, failed, skipped).

3 Answers

Found it. settig verbosity level lists tests:

dotnet test -v=normal (or higher)

I'm using .Net 6 with NUnit on macOS. Setting the verbosity level for dotnet test does not print a list of all executed tests (successful or otherwise).

What does print such a list is setting the logger verbosity like this:

dotnet test -l "console;verbosity=normal"

-v=normal won't work with dotnet. it's for msbuild. in dotnet you need to use -v:normal or just -v:n but it won't solve your problem you can also use -t argument to output all test names I didin't find correct argument

Related