Skip to content

A VsTest logger implementation that formats the result in a more pleasing manner

License

Notifications You must be signed in to change notification settings

nullean/vstest-pretty-logger

Repository files navigation

Nullean.VsTest.Pretty.TestLogger

Install from nuget.org

$ dotnet add package Nullean.VsTest.Pretty.TestLogger

This logger is intended to replace the default console logger. To do so create a .runsettings file

<RunSettings>
  <LoggerRunSettings>
    <Loggers>
        <Logger friendlyName="Console" enabled="False"/>
        <Logger friendlyName="pretty" enabled="True"/>
    </Loggers>
  </LoggerRunSettings>
</RunSettings>

Then make your Test.csproj (or fsproj!) aware of these .runsettings.

<PropertyGroup>
  <RunSettingsFilePath>$(MSBuildProjectDirectory)\.runsettings</RunSettingsFilePath>
</PropertyGroup>

Key goals

  • Clear feedback during tests
  • Notify of slow tests (taking longer then 2 seconds)
  • Pretty print stacktraces beyond a see of red
  • Grep for failures using [FAIL]
  • Make sure all failures are printed at the end of the run.

Show me the goods

This is what running tests will look like once configured:

asciicast

For comparison this is what dotnet test looks like out of the box without this logger

asciicast

About

A VsTest logger implementation that formats the result in a more pleasing manner

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages