Skip to content

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

License

Notifications You must be signed in to change notification settings

dominikhahn/LoggerExtensions

 
 

Repository files navigation

Logger Extensions

Reporting extensions for Visual Studio Test Platform.

Build status

Packages

Logger Nuget Package
AppVeyor 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

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# 77.5%
  • PowerShell 22.1%
  • Batchfile 0.4%