Skip to content

sistoimenov/LoggerExtensions

 
 

Repository files navigation

Logger Extensions

Reporting extensions for Visual Studio Test Platform.

Build status

Packages

Logger Nuget Package
AppVeyor NuGet
NUnit NuGet
Xunit NuGet

Usage

Appveyor logger

The appveyor logger can report test results automatically to the CI build. See an example: https://ci.appveyor.com/project/Faizan2304/loggerextensions/build/1.0.24/tests.

  1. Add a reference to the AppVeyor Logger nuget package in test project
  2. Use the following command line in tests
> dotnet test --test-adapter-path:. --logger:Appveyor
  1. Test results are automatically reported to the AppVeyor CI results

NUnit Logger

NUnit logger can generate xml reports in the NUnit v3 format (https://github.com/nunit/docs/wiki/Test-Result-XML-Format).

  1. Add a reference to the NUnit Logger nuget package in test project
  2. Use the following command line in tests
> dotnet test --test-adapter-path:. --logger:nunit
  1. Test results are generated in the TestResults directory relative to the test.csproj

A path for the report file can be specified as follows:

> dotnet test --test-adapter-path:. --logger:nunit;LogFilePath=loggerFile.xml

loggerFile.xml will be generated in the same directory as test.csproj.

Xunit Logger

Xunit logger can generate xml reports in the xunit v2 format (https://xunit.github.io/docs/format-xml-v2.html).

  1. Add a reference to the Xunit Logger nuget package in test project
  2. Use the following command line in tests
> dotnet test --test-adapter-path:. --logger:xunit
  1. Test results are generated in the TestResults directory relative to the test.csproj

A path for the report file can be specified as follows:

> dotnet test --test-adapter-path:. --logger:xunit;LogFilePath=loggerFile.xml

loggerFile.xml will be generated in the same directory as test.csproj.

LICENSE

MIT

About

Sample logger describing how to use logger extensibility to write logger for Microsoft TestPlatform.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 85.4%
  • PowerShell 14.4%
  • Batchfile 0.2%