Dotnet Test CLI Summary
Published in
May 3, 2022
A little trick to only show test summary with PS core (or grep)
If you also struggled with extra long verbose logs in dotnet test command, here is a little trick to just show failed or passed tests using a simple powershell command.
dotnet tool install --global PowerShell
Note: yes, powershell runs multi-platform so e.g. i am running this on a macos (would work also on other nix machines).
dotnet test | select-string -Pattern "(Passed|Failed)!"
If you don’t want/need ps, ofc a similar result can be obtained with the grep command ..
dotnet test | grep -Ei "^(Passed|Failed)!"
Cheers, and have a nice day!