.net - xUnit.net: What is the difference between .RunSettings and xunit.runner.json - Stack Overflow

admin2025-04-18  5

We are running xunit based tests using dotnet test via the command-line.

I stumbled now upon several configuration options for xunit that do not have the same amount of settings:

  • .RunSettings:
  • xunit.runner.json

Why are there not all settings available in both versions? When to use which flavor?

We are running xunit.net based tests using dotnet test via the command-line.

I stumbled now upon several configuration options for xunit that do not have the same amount of settings:

  • .RunSettings: https://xunit.net/docs/runsettings#runsettings
  • xunit.runner.json https://xunit.net/docs/configuration-files#schemas

Why are there not all settings available in both versions? When to use which flavor?

Share Improve this question asked Jan 29 at 9:32 Stefan VallasterStefan Vallaster 232 bronze badges 1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Bot Commented Jan 30 at 23:02
Add a comment  | 

1 Answer 1

Reset to default 1

.runsettings is a standardized way of configuring unit tests being run by VSTest or MSTest runners. xunit.runner.json is xUnit's own configuration alternative. Use whichever is most suitable to your setup.

https://learn.microsoft.com/en-us/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file?view=vs-2022

转载请注明原文地址:http://anycun.com/QandA/1744976955a90298.html