Skip to content

Latest commit

 

History

History
789 lines (701 loc) · 74.7 KB

framework.md

File metadata and controls

789 lines (701 loc) · 74.7 KB
uid
frameworkreleasenotes

Framework Release

NUnit 4.0.0-alpha.1 - TBA

This is the first alpha release of version 4 of NUnit. This is a gradual improvement of the version 3, and can be used with the same runners as before, although a minor upgrade might be needed for some. For the NUnit3TestAdapter, you will need version 4.5 to run tests with NUnit 4. This release have more than 50 fixes and improvements implemented.

The minimum target framework supported is now dotnet framework 4.6.2, and .net core 3.1.

Improvements

  • 4149 Distribute optimized framework builds with easy debugging. Thanks to Marko Lahma for the PR.
  • 4144 Stderr/Console.Error will hold back Unicode escaped log messages. Thanks to Max Schmitt for the PR.
  • 4112 Update documentation to clarify passing parameters to test cases. Thanks to Aaron Franke for the PR.
  • 4101 Expose ExpectedResult to the TestContext. Fixed by team PR.
  • 4086 Perform case-insensitive string comparisons in-place. Fixed by team PR.
  • 4053 Cache method discovery by migrating PR 4034 to main. Fixed by team PR.
  • 3984 Add net6.0 targets. Fixed by team PR.
  • 3899 Allow randomizing 'Guid' test arguments with [Random]. Thanks to Arnaud TAMAILLON for the PR.
  • 3866 SupportedOSPlatform. Fixed by team PR.
  • 3856 Theories in nested Testfixtures . Thanks to Felix Kröner for the PR.
  • 3457 Add DefaultConstraint. Thanks to Oleksandr Liakhevych for the PR.
  • 2843 Replacing ThrowsAsync with a composable async alternative. Thanks to gavin Lambert for the PR.

Bug fixes

  • 4319 TextRunner accidentally disposes System.Out. Thanks to Norm Johanson for the PR
  • 4308 Random attribute with Distinct and wide range causes test to disappear. Thanks to Russel Smith for the PR
  • 4255 InternalTrace.Initialize fails with Nullref exception. Fixed by team PR.
  • 4243 Type args are not deduced correctly for parameterized fixtures. Thanks to Samuel Delarosbil for the PR.
  • 4238 Update links to https in code comments. Fixed by team PR.
  • 4207 An example in 'BUILDING.md' contains a typo that leads to an error. Thanks to TillW for PR.
  • 3964 DictionaryContainsKeyValuePairConstraint doesn't work with IDictionary TKey, TValue. Thanks to Louis Zanella for the PR.
  • 3961 OneTimeTearDown runs on a new thread with mismatched Thread Name and Worker Id. Thanks to EraserKing for the PR.
  • 3953 Dispose is not called on test fixtures with LifeCycle.InstancePerTestCase without TearDown method. Fixed by team PR.
  • 3888 FixtureLifeCycle not applied correctly to nested test classes. Thanks to Merlijn van Deen for the PR.
  • 3872 Add support for ref bool, ref bool?, in bool, and in bool? when using NUnit.Framework.ValuesAttribute . Thanks to Samuel Delarosbil for the PR.
  • 3868 Order attribute skips classes with multiple test fixtures. Thanks to Daniela Mazur for the PR.
  • 3858 Running tests with ITestAction attributes leaks memory. Fixed by PR 4300 by lahma.
  • 3811 Incorrect summary comments on Warn.If overloads. Fixed by team PR.
  • 3432 Assert.That is blocking and might lead to deadlock when used with WCF. Thanks to Gavin Lambert for the PR.
  • 2870 CollectionTally (EquivalentTo) should throw for non-transitive comparisons. Thanks to Russel Smith for the PR
  • 1428 NUnitLite package always installs both Program.cs and Program.vb. Fixed by team PR.

Internal fixes

  • 4078 THREAD_ABORT not properly set. Fixed by team PR.
  • 4075 Remove unnecessary comparer allocations from NUnitEqualityComparer. Fixed by team PR.
  • 4065 Use pattern matching in the comparers. Fixed by team PR.
  • 4055 Use static Regex.IsMatch in ValueMatchFilter to take advantage of caching. Fixed by team PR.
  • 4051 Update codebase to use Array.Empty T. Thanks to Marcin Jedrzejek for PR.
  • 4049 Simplify property retrieval in DefaultTestAssemblyBuilder.Build(). Thanks to Scott Buchanan for the PR.
  • 3935 Numerics.IsFixedPointNumeric should return false for decimals. Thanks to Wellington Balbo for the PR.
  • 3932 Make Numerics class internal. Thanks to TillW for the PR.
  • 3764 Switch to the dotnet tool version of Cake. Fixed by team PR.
  • 2485 Remove\Trim copyright on individual files. Fixed by team PR.

Deprecations

  • 4036 Drop net45 build target in nunit4. Fixed by team PR.
  • 3980 Drop netcoreapp2.1 targets. Fixed by team PR.
  • 3769 Remove deprecated code, see issue for a detailed list of deprecated code. Fixed by team PR.
  • 3758 Drop net35 build target in nunit4. Fixed by team PR.
  • 3708 Drop net40 build target in nunit4. Fixed by team PR.
  • 3449 Assert.AreEqual overloads for nullable double are not useful. Thanks to Anton Ashmarin for the PR.
  • 3410 Consider deprecating NUnitEqualityComparer.AreEqual optional bool parameter . Thanks to TillW for PR.
  • 3708 Remove AssertionHelper and AssertionHelperTests.

NUnit 3.13.3 - March 20, 2022

This release includes several performance enhancements. @lahma provided a massive speed improvement for large, parametrized test suites. In addition, equivalency tests with large unsortable collections run faster by determining if the collections are sortable before attempting to sort them.

We've added several fixes for .NET 6.0 and we've stopped testing NUnit against .NET Core 2.1 which is now out of support.

There are also several fixes for the new FixtureLifeCycle feature and other smaller bug fixes and performance improvements.

Issues Resolved

  • 2963 Flakey tests in FrameworkControllerTests
  • 3643 Assert.Pass(message) produces "reason" in XML-Result
  • 3841 Breaking change: Is.SupersetOf with ValueTuple requires IComparable in NUnit 3.13.2
  • 3843 IDisposable & InstancePerTestCase: Object created for OneTimeSetUp is not disposed
  • 3898 NUnit 3.13.2 : LessThanOrEqualTo fails on a case which should succeed
  • 3903 Backport race condition fix (PR 3883)
  • 3904 Backport fix for "IDisposable & InstancePerTestCase" (PR 3843)
  • 3929 Fix high precision decimal calculations in v3.13 (#3898)
  • 3959 Marked 'NUnitEqualityComparer.AreEqual(object, object, Tolerance, bool)' as obsolete
  • 3962 Ensure that AfterTest always runs in AfterTestCommand
  • 3971 Backport "Add missing [DoesNotReturn] annotations" from #3958
  • 3976 Equivalency fallback for non-IComparable types can leave CollectionTally in corrupt state
  • 3998 Eagerly determine when a set is unsortable
  • 3999 Numeric comparison fails when it should succeed.
  • 4000 OverflowException comparing large double values
  • 4007 Eagerly detect sortable types for equivalency tests in 3.13.x
  • 4030 IsEmpty doesn't work with new .NET6 PriorityQueue
  • 4032 Tests won't run with an abstract base class that has a TestCaseFixtureSource
  • 4033 Recognized private members in base class for Source attributes
  • 4034 Improve method discovery and filtering performance
  • 4041 Minimize empty array allocations via centralized helper for pre-net46
  • 4043 Stop testing the framework against netcoreapp21 in v3.13 branch
  • 4045 Drop netcore2.1 as a target (backport #3986)
  • 4058 Remove TopLevel property from ValueMatchFilter

NUnit 3.13.2 - April 27, 2021

This release fixes a new issue with the FixtureLifeCycle attribute where IDisposable test fixtures were not being disposed properly. As always, @gleb-osokin has been a great help with this new feature.

It also fixes a long-standing performance issue with CollectionAssert.AreEquivalent and the CollectionEquivalentConstraint when comparing large collections. The deep comparison that NUnit performs on the two collections will always have a worst case bound of O(n^2) but we have optimized it so that the majority of use cases will be closer to O(n).

We've also made significant optimizations to the OR filters for selecting tests using their full name. This dramatically improves test performance for large code bases that use dotnet test. Thanks to @pakrym for his help with this.

Issues Resolved

  • 2799 CollectionAssert.AreEquivalent is extremely slow
  • 3589 File headers, copyrights, and licenses
  • 3773 IDisposable not working with InstancePerTestCase
  • 3779 Obsolete AreEqual methods with nullable numeric arguments for 3.13
  • 3784 Build the v3.13-dev branch
  • 3786 NUnit with dotnet test results in O(n^2) filtering complexity
  • 3810 Enable deterministic build
  • 3818 AppVeyor failing to build v3.13-dev branch PRs
  • 3832 Deploy v3.13-dev branch builds to MyGet

NUnit 3.13.1 - January 31, 2021

This release addresses several misses with the new FixtureLifeCycle attribute, switches to using SourceLink and NuGet snupkg packages for debugging into NUnit from your unit tests. It also addresses issues with the time format of ignored and explicit tests in the test results file.

Issues Resolved

  • 2339 Wrong date format in Ignored TestFixtures
  • 3715 FixtureLifeCycle(LifeCycle.InstancePerTestCase) Not working with TestFixtureSource
  • 3716 Assembly level FixtureLifeCycle(LifeCycle.InstancePerTestCase) doesn't work
  • 3724 Test start and end time should end with Z
  • 3726 Assert EqualTo().Within().Seconds does not work with DateTimes in NUnit 3.13
  • 3729 AppVeyor builds failing
  • 3736 AreEqual.Within throws on failure with non-numeric types
  • 3743 Parametrized tests do not respect FixtureLifeCycle.InstancePerTestCase
  • 3745 After upgrading to NUnit 3.13.0 the debugger enters NUnit code despite having checked "Enable Just My Code"

NUnit 3.13 - January 7, 2021

The FixtureLifeCycle attribute has been added to indicate that an instance for a test fixture or all test fixtures in an assembly should be constructed for each test within the fixture or assembly.

This attribute may be applied to a test fixture (class) or to a test assembly. It is useful in combination with the Parallelizable Attribute so that a new instance of a test fixture is constructed for every test within the test fixture. This allows tests to run in isolation without sharing instance fields and properties during parallel test runs. This make running parallel tests easier because it is easier to make your tests thread safe.

This release also fixes several issues running tests in .NET 5.0. If your tests target .NET 5.0, we recommend updating to this release.

Issues Resolved

  • 34 Async testing with F#
  • 52 Self-contained item in array causes stack overflow
  • 1394 Has.Property cannot see explicit interface implementation properties
  • 1491 Add a CLA to the project
  • 1546 NUnitEqualityComparer.GetEquatableGenericArguments should explicitly order arguments
  • 1809 Assert.AreEqual fails for Complex on Linux
  • 1897 EqualTo().Using() prevents caller from comparing strings to anything else
  • 2211 Add support of indexers to the PropertyConstraint
  • 2222 Switch to one Release branch
  • 2477 Parameterized fixture with Explicit attribute can not be run when selected by name
  • 2574 Instance-per-test-case feature
  • 2680 Deprecate the DebugWriter class
  • 3611 Properties are shown when --explore:nunit3 is run on entire project, but omitted when using the --where clause
  • 3054 Don't enforce [Timeout] when debugger is attached
  • 3075 Complete RunAsyncAction tests in FrameworkControllerTests
  • 3228 Modulo bias is present in Randomizer.NextDecimal(decimal)
  • 3240 Automate uploading of test results to Azure Pipelines
  • 3243 Azure DevOps does not build release branch
  • 3249 Pin GitLink version to speed up Cake script
  • 3251 RawInt32() can't use Next since the maximum is always exclusive and it would never return int.MaxValue
  • 3252 Timeout of 100 ms in TestTimeoutDoesNotStopCompletion occasionally fails the macOS build
  • 3253 Chance of failure in random bias tests is not sufficiently low for CI
  • 3256 Building under VS2019
  • 3257 Running under mono
  • 3259 The type of an Array isn't inferred from properly
  • 3264 Test that IRepeatTest only gets attributes via the IMethodInfo interface
  • 3275 Enable setting IgnoreUntilDate in TestCaseData.Ignore
  • 3279 Improve failure message from UniqueItemsConstraint
  • 3282 TimeoutAttribute makes all Assertions count as failure
  • 3283 ExecutionContext is flowed between unrelated tests
  • 3286 Testing for equality using a predicate throws exception for collections
  • 3290 'Good first issue' or 'help wanted' issue count badge
  • 3296 ExceptionHelper.GetExceptionMessage(Exception ex) should tolerate exceptions from exceptions
  • 3302 Incorrect formatting of failure message if test fails with Assert.Multiple
  • 3303 Check type of actual argument using consistent helper method
  • 3304 CheckString should not be a generic method
  • 3305 Remove unused methods
  • 3307 Sporadic GetResultIsNotCalledUntilContinued failure
  • 3308 Fix disposal in EnumerablesComparer
  • 3309 Simplify code in EventListenerTextWriter
  • 3311 Minimal unit of DateTime in the report when Test was started/ended
  • 3312 Simplify ProviderCache and make it instantiable since it is intentionally not thread safe
  • 3315 Assert.DoesNotThrow() stopped working as it was previously
  • 3318 Fix AwaitAdapter terminology
  • 3321 Keep dependencies up to date
  • 3322 Speed up build script by removing unnecessary builds
  • 3324 Broken link in CHANGES.md
  • 3328 Problems when using a mixture of Not and Or filters in NUnit framework 3.12.0
  • 3331 Contains.Key no longer working for IDictionary
  • 3338 Azure Pipelines is failing on Linux for both netstandard 1.4 and 2.0
  • 3356 SetUpFixture not run
  • 3368 Tests with warnings are not added to console TestResult.xml total count
  • 3383 Drop netstandard1.4 and stop testing on end-of-life versions of .NET Core
  • 3389 Show names of parameters
  • 3390 SetUpFixture not being triggered when running tests using --testlist
  • 3392 Use of Thread.CurrentPrincipal in Blazor/WASM
  • 3393 Nuget Package Not Signed
  • 3395 Randomizer.NextString() can probably be sped up
  • 3408 Save test results as build artifacts
  • 3411 Update nuspec file to mention support for NET Standard 2.0+
  • 3414 Azure pipelines are failing on Linux
  • 3415 Azure CI: Still publish test results on failure
  • 3423 TestResult.cs casts ITestResult to TestResult
  • 3447 Is.EqualTo(...).Using(StructuralComparisons.StructuralEqualityComparer or StructuralComparer) not working
  • 3452 Assertions that use an existing Regex
  • 3453 Visibility of SetUp/TearDown Methods
  • 3454 Pre-Filtering in NUnitLite has problems
  • 3464 Improve debugging experience
  • 3470 Assertion for key-value-pair
  • 3475 Our XML comments are using <code> (block element) instead of <c> (inline element)
  • 3485 Should we make MultipleAssertException.TestResult maybe-null or obsolete two constructors?
  • 3496 Adding data dictionary should not add a trailing newline
  • 3497 Fix mixed line endings in Git
  • 3503 Remove implicit cast from ITestResult to TestResult
  • 3505 Better failure messages for Subset and Superset constraints
  • 3506 ValueTuple tests now running if not targeting NET35
  • 3536 Reduce newly added API surface
  • 3542 Update NuGet Package Icons
  • 3547 DelayedConstraint constrains does not preserve original result additional information
  • 3551 Add PrivateAssets="all" to analyzer dependency
  • 3552 MessagePumpStrategy does not work for WPF on netcoreapp3.0 and upwards
  • 3559 Disables the DOC100 suggestion and reverts the added paragraph elements
  • 3563 Improve TextMessageWriter output for numeric values
  • 3565 .NET 5 issue with PlatformAttribute
  • 3583 Avoid using a culture-sensitive EndsWith in common code
  • 3592 Add classname and methodname to the start-test event
  • 3594 Reduce memory overhead of TestNameGenerator
  • 3596 AreAlmostEqualUlps throws OverflowException for -0
  • 3598 Fix typo
  • 3608 [Platform] attribute fails with DllNotFoundException in WASM
  • 3616 Extend Is.Empty to work for Guid.Empty
  • 3618 NUnit has a P/Invoke whose native function doesn't exist on all platforms
  • 3622 EmptyDirectoryConstraint doesn't need to enumerate entire directory contents
  • 3632 Assert.Inconclusive() reports failed when timeout used
  • 3636 NUnitLite filtering fails if space in test name before (
  • 3641 Type implementing IComparable<float> (or any IComparable) fails comparison.
  • 3647 Fix exception under Blazor 5
  • 3650 Build issue with the latest .NET SDK 5.0.100-rc.2
  • 3657 Add Framework Version to the XML
  • 3662 TestContext.CurrentContext.CurrentRepeatCount only contains retry count not the repeat count
  • 3667 Create FrameworkPackageSetting to set CurrentCulture and CurrentUICulture
  • 3676 Parallelizeable tests sometimes shares memory
  • 3679 Issue 3390: Do not prefilter relevant SetUpFixtures
  • 3694 Async tests causes double failure messages
  • 3699 Compilation of netcoreapp3.1 targets fails on CI (both AppVeyor and Azure Pipelines)

NUnit 3.12 - May 14, 2019

This release of NUnit finally drops support for .NET 2.0. If your application still targets .NET 2.0, your tests will need to target at least .NET 3.5. Microsoft ended support for .NET 2.0 on July 12, 2011. Microsoft recommends that everyone migrate to at least .NET Framework 3.5 SP1 for security and performance fixes.

This release dramatically improves NUnit support for async tests including returning ValueTask and custom tasks from tests, improved handling of SynchronizationContexts and better exception handling.

The .NET Standard 2.0 version of NUnit continues to gain more functionality that is found in the .NET 4.5 version of the framework like setting the ApartmentState and enabling Timeout on tests.

Issues Resolved

  • 474 TypeHelperTests.cs is orphaned
  • 999 Support multiple TestOf attributes per test
  • 1638 TimeoutAttribute not available when targeting netcoreapp framework
  • 2168 ThrowsAsync reports OperationCanceledException as TaskCanceledException
  • 2194 How to use Contains.Substring with And
  • 2286 Add support for custom Task (i.e. ValueTask)
  • 2579 AppVeyor Test Failures under .NET 3.5
  • 2614 TestExecutionContext.CurrentContext is saved in Remoting CallContext between test runs
  • 2696 Getting WorkerId fails in debug
  • 2772 Random failing of parallel test run: Unhandled Exception: System.InvalidOperationException: Stack empty.
  • 2975 ComparisonConstraints are allocating string on construction
  • 3014 Timeout failures on MacOS
  • 3023 NUnit runner fails when test method returns ValueTask<>
  • 3035 Apartment state can't be used for .NET Standard 2.0 tests
  • 3036 Apartment state can't be used for .NET Standard 2.0 tests
  • 3038 TestName in TestCase attribute not validated to be not empty
  • 3042 RequiresThreadAttribute allows ApartmentState.Unknown, unlike ApartmentAttribute
  • 3048 Add .idea folder to .gitignore
  • 3053 Conversion from TestCase string parameter to DateTimeOffset
  • 3059 Constraint Throws.Exception does not work with async return value
  • 3068 First Chance Exception in RuntimeFramework
  • 3070 End support for .NET Framework 2.0 (released in 2005)
  • 3073 CollectionAssert.AreEquivalent fails for ValueTuple Wrapped Dictionary
  • 3079 Regression from 3.10 to 3.11: Range in bytes
  • 3082 Is.Ordered.By
  • 3085 XML Test-Suite Assembly does not contain DLL path anymore
  • 3089 Remove outdated comment
  • 3093 Tests having TaskLike objects as their return type throws Exception
  • 3094 Bad error message if collections have different types
  • 3104 Removed NET20 compile output
  • 3105 Add tests for use of ApartmentState.Unknown in RequiresThreadAttribute
  • 3107 Declare class in Program.cs provided with NUnitLite Nuget package static
  • 3109 Azure DevOps build fails in Save package artifacts
  • 3124 Switch copyright notice
  • 3128 Correct documentation on ParallelScope
  • 3137 Fix doc-comments in NUnitTestAssemblyRunner
  • 3138 Assert.Ignore breaks when a Task is returned w/o using async/await
  • 3139 Add Azure pipelines badge to front page
  • 3144 Retry attribute should not derive from PropertyAttribute
  • 3145 Capture additional exception details in the test output
  • 3156 UnexpectedExceptionTests should tolerate Mono on Azure DevOps Ubuntu
  • 3159 Make tests more tolerant
  • 3161 https url repo
  • 3166 Allow static SetUpFixture classes
  • 3171 Incorrect type for Test Fixtures when using running explore with a filter
  • 3175 Improve user-facing messages
  • 3181 Template Based Test Naming - Incorrect truncation for individual arguments
  • 3186 Fix licenseUrl element in nuspec, will be deprecated
  • 3193 Cake Build Fails with Visual Studio 2019
  • 3195 Drop or at least make Travis not required?
  • 3231 Breaking change in filter functionality between framework 2.7 and 3.11
  • 3209 Test fail when posting to SynchronizationContext.Current
  • 3211 Fix logging
  • 3218 Remove to-dos from the code base
  • 3222 Our build script tests hang when run with Mono on Windows
  • 3233 AndConstraint should write additional information from failed constraint

NUnit 3.11 - October 6, 2018

  • More informative assertion messages
  • PlatformAttribute is available on and now detects .NET Core
  • ValuesAttribute now works with nullable types
  • Async tests detecting and running Windows Forms or WPF message pumps rather than deadlocking
  • Support for UWP 10.0 is back via .NET Standard 1.4

Issues Resolved

  • 352 Test with infinite loop in TearDown cannot be aborted
  • 452 Deprecate the existing Chocolatey framework package
  • 660 Order dependence of And and Or constraints should be documented
  • 1200 async test + Apartment(ApartmentState.STA) => await not returning on STA thread
  • 2123 Task.Run inside a test will result in deadlock if a control was created previously
  • 2146 Assert.That with a Throws constraint does not provide as much info as Assert.Throws
  • 2427 PropertyConstraint throws away the more helpful message in the base constraint result
  • 2432 Ability to exclude/include the platform .NET Core
  • 2450 NullReferenceException in ExceptionHelper.BuildMessage on Mono
  • 2536 SetArgDisplayNames for TestCaseData and TestFixtureData
  • 2611 Enable .NET Standard 1.6 tests on non-Windows
  • 2693 Ensure that ReSharper settings are consistent with the editorconfig configuration
  • 2757 Broken char comparison in v3.7 and higher
  • 2759 Test fails with "No arguments were provided" error when no values returned from IParameterDataSource
  • 2761 Infinite loop in nunit 3.9
  • 2781 Fixed pre-compiler typo
  • 2786 Timeout value not resetting on Retry of failed test
  • 2790 Removing ITypeInfo abstraction
  • 2798 [Request] Show actual count value when test fail on Has.Exactly(x).Items
  • 2814 Remove public marker types
  • 2819 Only run AppVeyor PR build against open PRs
  • 2821 Save and restore the SynchronizationContext before and after each test case
  • 2823 SetUp failed for test fixture - Array was not a one-dimensional array. Issue seems related to byte[,] method parameters
  • 2829 Obsoletion warning for DataAttribute
  • 2831 Regular "BusyExecIdle after 200 milliseconds delay" CI failures
  • 2833 Use longer BusyExecIdle to avoid CI failures
  • 2836 NUnit.Framework.Does cannot be extended
  • 2837 DictionaryContainsKeyConstraint behavior is inconstant with Dictionary.ContainsKey when the dictionary uses a custom Comparer
  • 2842 Supporting inheritance of Assert and related classes
  • 2854 Has.All.../Has.None... - show non-matching items in error message
  • 2863 Make tests robust without depending on the order of attributes
  • 2867 Skip executing TestCaseSources for tests which are not included in the filter
  • 2876 Implement Discovery-time filtering for NUnitLite
  • 2883 Our public ConcurrentQueue causes type conflicts
  • 2885 Copy/paste error in Assert.That documentation
  • 2887 NETStandard 1.3 support dropped in NUnit 3.10
  • 2896 Some tests are silently skipped on netstandard1.x since #2796
  • 2898 AssemblyPath contains invalid characters
  • 2901 Values attribute support for nullable bool and enum types
  • 2923 Update outdated CategoryAttribute xml doc
  • 2928 Improve error message on EmptyConstraint
  • 2929 Added NUnit XML schemas
  • 2940 Increase StackTracesAreFiltered amount to 5
  • 2955 Potential threading issue in IsolatedContext
  • 2965 NuGet Package : Add repository metadata.
  • 2970 InvalidCastException @ NUnit.Framework.TestFixtureSourceAttribute.BuildFrom
  • 2979 Warn.If in Assert.Multiple
  • 2994 Error in .NET Standard 1.4 DictionaryContainsKeyConstraint MetadataToken compatibility methods
  • 2996 Remove unused enum
  • 3009 Fix failing CI Builds by upgrading to NUnit Console 3.9.0
  • 3020 Upgrade nunit-vs-adapter to 3.10 for nUnit 3.11
  • 3024 Unable to add .IgnoreCase modifier to an AnyOf constraint in collection constraints
  • 3032 APIs to restore before 3.11

NUnit 3.10.1 - March 12, 2018

Added a namespace to the props file included in the NuGet package to make it compatible with versions of Visual Studio prior to VS 2017.

NUnit 3.10 - March 12, 2018

This release adds a .NET Standard 2.0 version of the framework which re-enables most of the features that have been missing in our earlier .NET Standard builds like parallelism, timeouts, directory and path based asserts, etc. It also contains numerous bug fixes and smaller enhancements. We've improved our XML docs, fixed performance issues and added more detail to Multiple Asserts.

This release also contains source-indexed PDB files allowing developers to debug into the NUnit Framework. This allows you to track down errors or see how the framework works.

In order to support the .NET Standard 2.0 version, the NUnit project switched to the new CSPROJ format and now requires Visual Studio 2017 to compile. This only effects people contributing to the project. NUnit still supports building and compiling your tests in older .NET IDEs and NUnit still supports older versions of the .NET Framework back to 2.0. For contributors, NUnit can now compile all supported targets on Windows, Linux and Mac using the Cake command line build.

Issues Resolved

  • 1212 Separate AssertionHelper project or assembly
  • 1373 Setting with a null value
  • 1382 Use array argument contents in name of parameterized tests rather than just array type.
  • 1578 TestContext.CurrentTest exposes too much internal info
  • 1678 Result Message: OneTimeSetUp: Category name must not contain ',', '!', '+' or '-'
  • 1944 Removing Compact Framework workarounds
  • 1958 System.Reflection.TargetInvocationException after run finished
  • 2033 Nameof refactor
  • 2202 Best practices for XML doc comments
  • 2325 Retry attribute doesn't retry the test.
  • 2331 Repo does not build in VS without running build -t build first
  • 2405 Improve PropertyConstraint error output
  • 2421 Publishing symbols with releases
  • 2494 CollectionAssert.AllItemsAreUnique() very slow
  • 2515 Re-target Solution to use the New CSPROJ Format
  • 2518 Bug in CollectionAssert.AreEqual for ValueTuples.
  • 2530 Running tests on main thread. Revisiting #2483
  • 2542 NUnit does not support parallelism on .NET Core 2.0
  • 2555 CI timeout: NUnit.Framework.Assertions.CollectionAssertTest.PerformanceTests
  • 2564 Add minClientVersion to .nuspec files
  • 2566 Refactor SimpleEnumerableWithIEquatable test object
  • 2577 Warning in TearDown is inconsistent with Assertion failure
  • 2580 Remove unused defines
  • 2591 NUnitEqualityComparer.Default should be replaced with new NUnitEqualityComparer()
  • 2592 Add .props with ProjectCapability to suppress test project service GUID item
  • 2608 Culture differences on .NET Core on non-Windows causes test failures
  • 2622 Fix flakey test
  • 2624 Prevent emails for successful builds on Travis
  • 2626 SetUp/TearDown methods are invoked multiple times before/after test in .NET Standard targeted projects
  • 2627 Breaking change in CollectionAssert.AllItemsAreUnique with NUnit 3.9
  • 2628 Error during installing tools when running build script
  • 2630 Framework throws NullReferenceException if test parameter is marked with [Values(null)]
  • 2632 Parallel tests are loading 100% CPU when nested SetUpFixture exists
  • 2639 ValuesAttribute causes ExpectedResult to have no effect
  • 2647 Add Current Attempt indicator in TestContext for use with RetryAttribute
  • 2654 Address feedback from @oznetmaster
  • 2656 NuGet package links to outdated license
  • 2659 Naming Errors
  • 2662 NullReferenceException after parallel tests have finished executing
  • 2663 Building NUnit .NET 4.5 in VS2017 fails
  • 2669 Removed vestigial build script helper method
  • 2670 Invalid assemblies no longer give an error message
  • 2671 Ensure that FailureSite.Child is used where appropriate.
  • 2685 Remove Rebracer file
  • 2688 Assert.Throws swallows console output
  • 2695 MultipleAssertException doesn't provide proper details on failures
  • 2698 Syntax suggestions errors as warnings
  • 2704 Add Constraint to test whether actual item is contained in expected collection
  • 2711 NUnitLite: Add support for --nocolor option
  • 2714 AnyOfConstraint enumerates multiple times
  • 2725 Enable 'strict' compilation flag
  • 2726 Replace the ConcurrentQueue and SpinWait compatibility classes
  • 2727 Avoid treating warnings as errors inside the IDE
  • 2734 TestCaseAttribute: ExpectedResult should support same value conversion as normal method arguments
  • 2742 FailureSite not correctly set on containing suites when tests are ignored.
  • 2749 Update Travis SDK versions

NUnit 3.9 - November 10, 2017

This release addresses numerous parallelization issues that were introduced in 3.8 when method level parallelization was added. Most of the parallelization issues resolved were tests never completing when using some combinations of parallel tests and ApartmentState not being properly applied to tests in all cases.

Issues Resolved

  • 893 Inconsistent Tuple behavior.
  • 1239 NUnit3 sometimes hangs if SetUpFixtures are run in parallel
  • 1346 NullReferenceException when [TestFixtureSource] refers to data in a generic class.
  • 1473 Allow Is.Ordered to Compare Null Values
  • 1899 Constraint Throws.Exception does not catch exception with async lambdas
  • 1905 SetupFixture without namespace will make assembly-level Parallelizable attribute useless
  • 2091 When a native exception of corrupted state is thrown, nunit test thread crashes and the nunit-console process hangs
  • 2102 NUnitLite incorrectly reports Win 10 OS name
  • 2271 When CollectionAssert.AreEqual do compare each element, it will ignore the IEquatable of the element too
  • 2289 ResolveTypeNameDifference does not handle generic types well
  • 2311 Resolve test projects' namespace situation
  • 2319 Add .editorconfig to set file encodings so that people don't have to think about it
  • 2364 Parallelizable attribute not invalidating invalid parallel scope combinations
  • 2372 Create testing for compounded ConstraintFilters
  • 2388 Parallelization causes test cases to stop respecting fixture's apartment state
  • 2395 NUnit 3.8+ does not finish running tests
  • 2398 NUnit CI spurious failures, NUnit.Framework.Internal.ThreadUtilityTests.Kill
  • 2402 --labels=All doesn't show anything in console output executing NUnitLite Console Runner
  • 2406 Summary descriptions replaced by more detailed ones
  • 2411 And constraint on Has.Member throws
  • 2412 Using fluent syntax unintentionally removed in 3.8
  • 2418 Support equality comparison delegate
  • 2422 Has.Property causes AmbiguousMatchException for shadowing properties
  • 2425 XML doc typo fix
  • 2426 Regression in 3.8.1: ApartmentAttribute no longer works when applied to an assembly
  • 2428 Fix NullReferenceExceptions caused by WorkItemQueue not being thread-safe
  • 2429 Stack trace shown for Assert.Warn
  • 2438 [Parallelizable] hangs after a few tests
  • 2441 Allows to override load-time/execution-time interfaces in built-in tests attributes
  • 2446 CI failure in mono Warning tests
  • 2448 Inherited Test SetUp, TearDown, etc. are not executed in .NET Core if they are not public
  • 2451 Compile RegEx to improve performance
  • 2454 SetUpFixture not respecting NonParallelizable tag on TestFixtures.
  • 2459 [Parallelizable(ParallelScope.Children)] Unable to finish tests
  • 2465 Possible wrong properties are returned by reflection in ReflectionExtensions.cs
  • 2467 Test execution hangs when using [SetUpFixture] with NUnit 3.8.x
  • 2469 Allow RangeAttribute to be specified multiple times for the same argument
  • 2471 Parametrized test cases not running in parallel
  • 2475 Framework incorrectly identifies Win 10 in xml results
  • 2478 Attributes on SetUpFixture are not applied
  • 2486 Message when asserting null with Is.EquivalentTo could be more helpful
  • 2497 Use ConstraintUtils.RequireActual through out the codebase
  • 2504 Support changing test display name on TestFixtureData
  • 2508 Correct divergence from shadowed Is / Has members.
  • 2516 When test writes something to the stdErr there is no guaranteed way to link a test-output event to a target test using ITestEventListener
  • 2525 Remove unwanted space from comment
  • 2526 SerializationException in low trust floating point equality test
  • 2533 Matches<T>(Predicate<T>) throws ArgumentException or Fails when actual is null
  • 2534 SetUpFixture causes NUnit to lock with Apartment( STA )
  • 2551 CollectionItemsEqualConstraint is missing Using(Func<T, T, bool>)
  • 2554 Made TestFixtureData.SetName internal for 3.9

NUnit 3.8.1 - August 28, 2017

This release fixes two critical regressions in the 3.8 release. The first caused the console runner to crash if you are using test parameters. The second issue caused collection constraints checking for multiple items in a collection to fail.

Issues Resolved

  • 2386 Contains.Item() fails for collections in NUnit 3.8
  • 2390 Missing value attribute in test parameters setting causes NullReferenceException in console

NUnit 3.8 - August 27, 2017

This release removes several methods and attributes that were marked obsolete in the original 3.0 release. Support for iOS and Android has been improved.

An issue that caused unit tests to run slower was addressed as was a bug that prevented the use of Assert.Multiple in async code.

The Order attribute can now also be applied to the class level to set the order that test fixtures will be run.

Issues Resolved

  • 345 Order of Fixture Execution
  • 1151 Include differences in output for Is.EquivalentTo
  • 1324 Remove CollectionContainsConstraint
  • 1670 Attaching files to the test result
  • 1674 InRange-Constraint must work with object
  • 1851 TestCaseSource unable to pass one element byte array
  • 1996 Timeout does not work if native code is running at the time
  • 2004 Has.One as synonym for Has.Exactly(1).Items
  • 2062 TestCaseSource attribute causes test to pass when source is not defined
  • 2144 Allow option on RandomAttribute to produce distinct values
  • 2179 Some NUnit project's tests fail on systems with CultureInfo other than en
  • 2195 Contains.Substring with custom StringComparison
  • 2196 Expose ParallelizableAttribute (and other attribute) constructor arguments as properties
  • 2201 Invalid platform name passed to PlatformAttribute should mark test NotRunnable
  • 2208 StackFilter trims leading spaces from each line
  • 2213 SetCultureAttribute: CultureInfo ctor should use default culture settings
  • 2217 Console runner performance varies wildly depending on environmental characteristics
  • 2219 Remove Obsolete Attributes
  • 2225 OneTimeTearDown and Dispose Ordering
  • 2237 System.Runtime.Loader not available for iOS/Android
  • 2242 Running tests directly should never surface a NullReferenceException
  • 2244 Add KeyValuePair<TKey, TValue> to the default formatters
  • 2251 Randomizer.NextGuid()
  • 2253 Parallelizable(ParallelScope.Fixtures) doesn't work on a TestFixture
  • 2254 EqualTo on ValueTuple with Nullable unexpected
  • 2261 When an assembly is marked with ParallelScope.None and there are Parallelizable tests NUnit hangs
  • 2269 Parallelizable and NonParallelizable attributes on setup and teardown silently ignored
  • 2276 Intermittent test failures in Travis CI: TestContextTests
  • 2281 Add type constraint for Throws and any method requiring Exception
  • 2288 Killing thread cancels test run
  • 2292 Is.Ordered.By() with a field throws NullReferenceException
  • 2298 Write TestParametersDictionary to xml result file in readable format
  • 2299 NUnitLite NuGet package no longer installs NUnit NuGet package
  • 2304 Revert accidental doc removal
  • 2305 Correct misprint ".con" -> ".com"
  • 2312 Prevent crash on invalid --result parsing in NUnitLite
  • 2313 Incorrect xml doc on RetryAttribute
  • 2332 Update build script to use NUnitConsoleRunner v3.7.0
  • 2335 Execute OneTimeTearDown as early as possible when running fixtures in parallel
  • 2342 Remove deprecated Is.String* Constraints
  • 2348 Can't use Assert.Multiple with async code
  • 2353 Provide additional Result information through TestContext
  • 2358 Get framework to build under Mono 5.0
  • 2360 Obsolete CollectionContainsConstraint Constructors
  • 2361 NUnit Parallelizable and OneTimeSetUp with no namespace results in single-threaded test execution
  • 2370 TestCaseAttribute can't convert int to nullable long

NUnit 3.7.1 - June 6, 2017

This is a hotfix release that addresses occasional hangs when using test parallelization and fixes crashes in NCrunch prior to version 3.9.

Issues Resolved

  • 2205 NCrunch: System.Xml.XmlException: Root element is missing, when adding NUnit 3.7.0
  • 2209 NUnit occasionally hangs when parallelizable TestFixture has OneTimeSetUp and OneTimeTearDown

NUnit 3.7 - May 29, 2017

This release of NUnit expands on parallel test execution to allow test methods to be run in parallel. Please see the Parallelizable Attribute for more information.

NUnit 3.7 also drops the Portable build of the framework and replaces it with a .NET Standard 1.3 version to compliment the .NET Standard 1.6 version. This change enables several constraints and other features in the .NET Standard builds that weren't available in portable like Path and Directory based asserts.

The AssertionHelper class has been deprecated because it is seldom used and has not received any of the updates that Asserts and Constraints receive. If your code is using the AssertionHelper class, we recommend that you migrate your asserts.

Issues Resolved

  • 164 Run test methods within a fixture in parallel
  • 391 Multiple Assertions
  • 652 Add ability to execute test actions before SetUp or OneTimeSetUp
  • 1000 Support multiple Author attributes per test
  • 1096 Treat OneTimeSetup and OneTimeTearDown as separate work items
  • 1143 NUnitLite - Explore flag does not apply where filter to output
  • 1238 Feature request: Print LoaderExceptions when fixture loading fails
  • 1363 Make Timeouts work without running test on its own thread
  • 1474 Several SetUpFixtures at the same level may be active at the same time
  • 1819 TestContext.Progress.Write writes new line
  • 1830 Add --labels switch changes to NUnitLite and NUnitLite tests
  • 1859 ConcurrentQueue is duplicate with System.Threading.dll package
  • 1877 Resolve differences between NUnit Console and NUnitLite implementations of @filename
  • 1885 Test parameter containing a semicolon
  • 1896 Test has passed however Reason with an empty message is printed in the xml
  • 1918 Changing DefaultFloatingPointTolerance breaks tests running in parallel
  • 1932 NUnit Warn class should be removed from stack trace by filter
  • 1934 NullReferenceException when null arguments are used in TestFixtureAttribute
  • 1952 TestContext.Out null when used in task with .NET Core
  • 1963 Investigate removing SpecialValue
  • 1965 TestContext does not flow in async method
  • 1971 Switch CHANGES.txt to Markdown
  • 1973 Implemented TestExecutionContext to use AsyncLocal<> for NETSTANDARD1_6
  • 1975 TestFixtureSource doesn't work with a class that has no namespace
  • 1983 Add missing ConstraintExpression.Contain overload
  • 1990 Add namespace filter
  • 1997 Remove unused --verbose and --full command line options
  • 1999 Author Tests assume ICustomAttributeProvider.GetCustomAttributes return order is defined
  • 2003 Better user info about ParallelizableAttribute and ParallelScope
  • 2005 Exclude empty failure messages from results xml
  • 2007 3.6 Multiple assertion backwards compatibility
  • 2010 Add DelayedConstraint in NetStandard 1.6 build
  • 2020 Better message when timeout fails
  • 2023 Ability to abort threads running a message pump
  • 2025 NullReferenceException using Is.EqualTo on two unequal strings
  • 2030 Add method to mark tests as invalid with a reason
  • 2031 Limit Language level to C#6
  • 2034 Remove SilverLight project - no longer used
  • 2035 NullReferenceException inside failing Assert.That call
  • 2040 Cannot catch AssertionException
  • 2045 NUnitLite-runner crashes if no file is provided
  • 2050 Creation of TestExecutionContext should be explicit
  • 2052 NullReferenceException with TestCaseSource if a property has no setter
  • 2061 TestContext.WorkDirectory not initialized during build process
  • 2079 Make TestMethod.Arguments public or otherwise accessible (e.g. TestContext)
  • 2080 Allow comments in @FILE files
  • 2087 Enhance error message: Test is not runnable in single-threaded context. Timeout
  • 2092 Convert Portable library to .NET Standard 1.3
  • 2095 Extend use of tolerance to ComparisonConstraints
  • 2099 Include type in start-suite/start-test report elements
  • 2110 NullReferenceException when getting TestDirectory from TestContext
  • 2115 Mark AssertionHelper as Obsolete
  • 2121 Chained PropertyConstraint constraints report incorrect ActualValue
  • 2131 Remove "Version 3" suffix from NUnitLite NuGet Package
  • 2132 TestFixtureTests.CapturesArgumentsForConstructorWithMultipleArgsSupplied assumes order of custom attributes
  • 2143 Non-parallel fixture with parallel children runs in parallel with other fixtures
  • 2147 Test Assembly using NUnitLite & NUnit 3.6.1 hangs under .NET Core when --timeout is supplied on command line
  • 2150 Add portable-slow-tests to Cake file
  • 2152 Allow attaching files to TestResults
  • 2154 Fix execution of non-parallel test fixtures
  • 2157 Getting WorkerId inside Assert.Throws / DoesNotThrow returns null instead of previous non-null value
  • 2158 Update SetupFixtureAttribute XML Docs
  • 2159 Prevent crash in .NET standard with log file path
  • 2165 Trying to install NUnit 3.6.1 on .NET Framework asks for download of 20 more packages
  • 2169 Incorrect xml docs for SetUpAttribute
  • 2170 Cake build fails if only Visual Studio 2017 installed
  • 2173 Remove PreTestAttribute and PostTestAttribute
  • 2186 Replace special characters as part of converting branch names to package versions
  • 2191 System.Reflection.TargetInvocationException with nunit3-console --debug on Mono

NUnit 3.6.1 - February 26, 2017

This is a hotfix release of the framework that addresses critical issues found in the 3.6 release.

Issues Resolved

  • 1962 A Theory with no data passes
  • 1986 NUnitLite ignores --workers option
  • 1994 NUnitLite runner crashing when --trace is specified
  • 2017 Two NUnit project's tests fail on systems with comma decimal mark settings
  • 2043 Regression in 3.6.0 when catching AssertionException

NUnit 3.6 - January 9, 2017

This release of the framework no longer includes builds for Compact Framework or for SilverLight, but adds a .NET Standard 1.6 build. If anyone still using Compact Framework or SilverLight and would like to continue development on those versions of the framework, please contact the NUnit team.

Framework

  • .NET Standard 1.6 is now supported
  • Adds support for Multiple Assert blocks
  • Added the --params option to NUnitLite
  • Theories now support Nullable enums
  • Improved assert error messages to help differentiate differences in values
  • Added warnings with Warn.If(), Warn.Unless() and Assert.Warn()
  • Enabled Path, File and Directory Asserts/Constraints for .NET Core testing
  • Added NonTestAssemblyAttribute for use by third-party developers to indicate that their assemblies reference the NUnit framework, but do not contain tests

Issues Resolved

  • 406 Warning-level Assertions
  • 890 Allow file references anywhere in the command line.
  • 1380 AppVeyor Failures when branch name is too long
  • 1589 Split the nunit repository into multiple repositories
  • 1599 Move Compact Framework to separate project
  • 1601 Move SilverLight to a separate project
  • 1609 Upgrade Cake build to latest version
  • 1661 Create .NET Standard Framework Build
  • 1668 Need implementation-independent way to test number of items in a collection
  • 1743 Provide multiple results for a test case in the XML output
  • 1758 No direct inverse for Contains.Key
  • 1765 TestCaseSourceAttribute constructor for method with parameters
  • 1802 Design Multiple Assert syntax as seen by users
  • 1808 Disambiguate error messages from EqualConstraint
  • 1811 Build.ps1 fails if spaces in path
  • 1823 Remove engine nuspecs and old global.json
  • 1827 Remove unused repository paths from repositories.config
  • 1828 Add Retry for failed tests only
  • 1829 NUnitLite accepts --params option but does not make any use of it.
  • 1836 Support nullable enums in Theories
  • 1837 [Request] AfterConstraint to support more readable usage
  • 1840 Remove SL and CF #Defined source
  • 1866 [Request] More readable way to set polling interval in After constraint
  • 1870 EqualConstraint result failure message for DateTime doesn't show sufficient resolution
  • 1872 Parameterized method being called with no parameter
  • 1876 What should we do about Env.cs
  • 1880 AttributeUsage for various Attributes
  • 1889 Modify NUnitLite to display multiple assert information
  • 1891 TestContext.Progress and TestContext.Error silently drop text that is not properly XML encoded
  • 1901 Make NUnitLite-runner Prefer32Bit option consistent across Debug/Release
  • 1904 Add .NET Standard 1.6 Dependencies to the Nuspec Files
  • 1907 Handle early termination of multiple assert block
  • 1911 Changing misleading comment that implies that every ICollection<T> is a list
  • 1912 Add new warning status and result state
  • 1913 Report Warnings in NUnitLite
  • 1914 Extra AssertionResult entries in TestResults
  • 1915 Enable Path, File and Directory Assert/Constraints in the .NET Standard Build
  • 1917 Use of IsolatedContext breaks tests in user-created AppDomain
  • 1924 Run tests using the NUnit Console Runner
  • 1929 Rename zip and remove source zip
  • 1933 Tests should pass if test case source provides 0 test cases
  • 1941 Use dictionary-based property for test run parameters
  • 1945 Use high-quality icon for nuspecs
  • 1947 Add NonTestAssemblyAttribute
  • 1954 Change Error Message for Assert.Equals
  • 1960 Typo fixes
  • 1966 Xamarin Runner cannot reference NUnit NuGet Package

Earlier Releases