Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from MSTest.TestFramework to xunit #232

Open
JamieMagee opened this issue Aug 26, 2022 · 0 comments
Open

Migrate from MSTest.TestFramework to xunit #232

JamieMagee opened this issue Aug 26, 2022 · 0 comments
Assignees
Labels
status:requirements Full requirements are not yet known, so implementation should not be started type:refactor Refactoring or improving of existing code

Comments

@JamieMagee
Copy link
Member

There are 3 major testing frameworks for .NET: MSTest1, xunit2, and NUnit3. MSTest was (likely) chosen for Component Detection as it was the default test framework when creating a new project in Visual Studio.

Out of the 3 frameworks xunit has the most downloads. Currently MSTest has 146M, NUnit 194M, and xunit has 273M. That alone shows that xunit has more developer mindshare. Some other benefits include:

  • [SetUp] and [TearDown] are not included to promote cleaner tests
  • Attributes and classes aren't sealed allowing for easy extensibility

References:

Footnotes

  1. https://www.nuget.org/packages/MSTest.TestFramework/

  2. https://www.nuget.org/packages/NUnit

  3. https://www.nuget.org/packages/xunit

@JamieMagee JamieMagee added status:requirements Full requirements are not yet known, so implementation should not be started type:refactor Refactoring or improving of existing code labels Aug 26, 2022
@RushabhBhansali RushabhBhansali self-assigned this Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:requirements Full requirements are not yet known, so implementation should not be started type:refactor Refactoring or improving of existing code
Projects
Development

No branches or pull requests

2 participants