-
Notifications
You must be signed in to change notification settings - Fork 803
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 existing NUnit tests to xUnit #9947
Comments
@vzarytovskii can you please comment why? What is wrong with NUnit? |
Nothing wrong with NUnit, since we've started migrating old fsharpqa and Cambridge suites to the new standard dotnet test suites, we've just chosen xUnit as default framework. I guess, the main reason is it's already widely adopted in most of the exiting .NET projects (for example Roslyn, runtime, sdk, aspnetcore), so we want have same experience across all projects. Also, I, personally find it a bit less verbose, than NUnit, and a bit easier to extend (but again, it is probably just my subjective take on it). |
@sergey-tihon Please, let me know if you would like to chat about it, i would gladly discuss it :) |
I am not strongly agains xUnit, just wonder why some .net project choose xUnit over NUnit and what benefits come with xUnit. I personally less experienced with xUnit, but when I tried to port some of my projects to xUnit I stuck with inability execute Theory in parallel what is easy doable in NUnit If you have samples where xUnit is less verbose and easier to extent on top of you mind, I will be glad to take a look. |
I hitting bunch of exceptions during execution of `dotnet test tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj` on Linux with only .NET 6 installed. ``` System.ArgumentException: Unknown framework version 6.5 (Parameter 'version') at NUnit.Framework.Internal.RuntimeFramework.ThrowInvalidFrameworkVersion(Version version) at NUnit.Framework.Internal.RuntimeFramework.InitFromFrameworkVersion(Version version) at NUnit.Framework.Internal.RuntimeFramework..ctor(RuntimeType runtime, Version version) at NUnit.Framework.Internal.RuntimeFramework.<>c.<.cctor>b__33_0() at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy`1.CreateValue() at System.Lazy`1.get_Value() at NUnit.Framework.Internal.RuntimeFramework.get_CurrentFramework() at NUnit.Framework.Internal.PlatformHelper..ctor() at NUnit.Framework.TestCaseAttribute.BuildFrom(IMethodInfo method, Test suite)+MoveNext() at NUnit.Framework.Internal.Builders.DefaultTestCaseBuilder.BuildFrom(IMethodInfo method, Test parentSuite) at NUnit.Framework.Internal.Builders.NUnitTestFixtureBuilder.AddTestCasesToFixture(TestFixture fixture, IPreFilter filter) at NUnit.Framework.Internal.Builders.NUnitTestFixtureBuilder.BuildFrom(ITypeInfo typeInfo, IPreFilter filter) at NUnit.Framework.Internal.Builders.DefaultSuiteBuilder.BuildFrom(ITypeInfo typeInfo, IPreFilter filter) ``` In spirit of dotnet#9947 maybe would be better to migrate these tests to XUnit
I hitting bunch of exceptions during execution of `dotnet test tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj` on Linux with only .NET 6 installed. ``` System.ArgumentException: Unknown framework version 6.5 (Parameter 'version') at NUnit.Framework.Internal.RuntimeFramework.ThrowInvalidFrameworkVersion(Version version) at NUnit.Framework.Internal.RuntimeFramework.InitFromFrameworkVersion(Version version) at NUnit.Framework.Internal.RuntimeFramework..ctor(RuntimeType runtime, Version version) at NUnit.Framework.Internal.RuntimeFramework.<>c.<.cctor>b__33_0() at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy`1.CreateValue() at System.Lazy`1.get_Value() at NUnit.Framework.Internal.RuntimeFramework.get_CurrentFramework() at NUnit.Framework.Internal.PlatformHelper..ctor() at NUnit.Framework.TestCaseAttribute.BuildFrom(IMethodInfo method, Test suite)+MoveNext() at NUnit.Framework.Internal.Builders.DefaultTestCaseBuilder.BuildFrom(IMethodInfo method, Test parentSuite) at NUnit.Framework.Internal.Builders.NUnitTestFixtureBuilder.AddTestCasesToFixture(TestFixture fixture, IPreFilter filter) at NUnit.Framework.Internal.Builders.NUnitTestFixtureBuilder.BuildFrom(ITypeInfo typeInfo, IPreFilter filter) at NUnit.Framework.Internal.Builders.DefaultSuiteBuilder.BuildFrom(ITypeInfo typeInfo, IPreFilter filter) ``` In spirit of #9947 maybe would be better to migrate these tests to XUnit
Migrate existing NUnit test suites (mostly UnitTest ones), to xUnit.
The text was updated successfully, but these errors were encountered: