Awesome
[!IMPORTANT]
Development of v4.x and subsequent versions of the Xunit logger is moved to the testlogger repository. Kindly report any new issues or contribute your patches in that repo.
Xunit Test Logger
Xunit logger extensions for Visual Studio Test Platform.
Packages
Logger | Stable Package | Pre-release Package |
---|---|---|
Xunit |
If you're looking for nunit
, junit
or appveyor
loggers, visit following repositories:
- https://github.com/spekt/nunit.testlogger
- https://github.com/spekt/junit.testlogger
- https://github.com/spekt/appveyor.testlogger
Usage
Xunit logger can generate xml reports in the xunit v2 format (https://xunit.net/docs/format-xml-v2).
- Add a reference to the Xunit Logger nuget package in test project
- Use the following command line in tests
> dotnet test --logger:xunit
- Test results are generated in the
TestResults
directory relative to thetest.csproj
A path for the report file can be specified as follows:
> dotnet test --logger:"xunit;LogFilePath=test_result.xml"
test_result.xml
will be generated in the same directory as test.csproj
.
Note: the arguments to --logger
should be in quotes since ;
is treated as a command delimiter in shell.
All common options to the logger is documented in the wiki.
License
MIT