XUnit

xUnit is a free, open source, community-focused unit testing tool for C#, F#, and Visual Basic. xUnit.net v3 supports .NET 8.0 or later, and .NET Framework 4.7.2 or later. xUnit.net works with ReSharper, CodeRush, TestDriven.NET and Xamarin. You just need to install the popular xUnit.net test runner and install Tacotruck CLI or use Github action. Check out simple xUnit.net example.

Generate XML Report

To generate xml file report, you can use the spekt/testlogger library which provides Junit, NUnit and Xunit logger/reporter extensions for Visual Studio Test Platform (VSTest).

First, install the appropriate test logger package:

dotnet add package JunitXml.TestLogger

Then run tests with the logger and log file path:

dotnet test --logger:"junit;LogFilePath=../test-results.xml"

Install Tacotruck CLI

$ npm install -g @testfiesta/tacotruck

Submit test results

tacotruck testfiesta \
  run:submit \
  --token testfiesta_... \
  --handle orgHandle \
  --key projectKey \
  --name runName \
  --data results-path/*.xml

Last updated