Xunit logger extensions for Visual Studio Test Platform.
Logger | Stable Package | Pre-release Package |
---|---|---|
Xunit |
Xunit logger can generate xml reports in the xunit v2 format (https://xunit.github.io/docs/format-xml-v2.html).
- Add a reference to the Xunit Logger nuget package in test project
- Use the following command line in tests
> dotnet test --test-adapter-path:. --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 --test-adapter-path:. --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.
MIT