Framework Release
NUnit 4.2 - To Be released very soon now
There are 28 issues fixed in this release.
Enhancements
- 4710 Improve PropertiesComparer diagnostics. Fixed by team PR 4712
- 4353 TestContext.AddTestAttachment with long file paths. Thanks to Rohit Aggarwal for PR 4665
- 3918 String comparison without whitespace. Fixed by team PR 4664
- 3829 Consider optimizing
StreamsComparer
for happy path. Thanks to Mithilesh Zavar for PR 4668 - 3767 Incorrect number of items listed in failure message. Thanks to Dmitrij for PR 4702
- 1396 Class Level Category Missing from TestContext. Fixed by team PR 4757
- 796
TestContext.CurrentContext.Test.Properties
from TestFixture should be available fromTestContext
for Test. Fixed by team PR 4757 - 548 Properties set on a parameterized method are not accessible to TestContext. Fixed by team PR 4757
- 4587 Feature request: Assert.Multiple() could return an IDisposable, avoiding passing an Action around.. Fixed by team PR 4758
Bug fixes
- 4750
DefaultFloatingPointTolerance
ignored forTestCaseData
. Fixed by team PR 4754 - 4723 CurrentContext.Result.Outcome.Status is inconclusive in TearDown if Timeout attribute is used in 4.x. Fixed by team PR 4727
- 4705 The dll's in the release 4.1 has version 4.0.1. Fixed by team PR 4706
- 4670
.ContainKey().WithValue()
and.Or
/.And
interact incorrectly. Fixed by team PR 4672 - 4659 TestCaseSource that contains Exception with InnerException - not running tests. Fixed by team PR 4663
- 4651 After upgrade from version 3.14.0 to 4.* running multiple test categories in parentheses separated with 'OR' stopped working. Fixed by team PR 4760
- 4639
ValueTask
is not being properly consumed by theAwaitAdapter
. Fixed by team PR 4640 - 4598 DefaultTimeout in .runsettings + TearDown method seems to break test output. Fixed by team PR 4692
- 4589 Exception when using test filters from .runsettings or --filter argument from dotnet test. Fixed by team PR 4760
- 1358 TestContext.CurrentContext.Test.Properties does not contain value(s) from PropertyAttribute when using TestCaseAttribute. Fixed by team PR 4757
Refactorings
Internal fixes
- 4735 StreamComparer - Pool allocating the byte array reduces memory allocation by 96%. Thanks to Mithilesh Zavar for PR 4737
- 4733 Improve speed of Randomizer.GetString. Fixed by team PR 4512
- 3981 Switch default branch to main. Fixed by team PR 4753
- 4649 Switch to using MacOS 14 in GitHub Actions. Fixed by team PR 4648
Deprecated features
None
Others
- 4765 Document ThrowOnEachFailurUnderDebugger.
- 4730 Remove reference to the mailing list from CONTRIBUTING.md. Fixed by team PR 4752
- 4726
Using<TCollectionType, TMemberType>
is unclear. Thanks to Michael Render for PR 4729 - 4684 Increment StreamsComparer by 'Actual bytes read' rather than the buffer size. Fixed by team PR 4671
The following issues are marked as breaking changes
None
NUnit 4.1 - February 23. 2024
This release is a bugfix and smaller enhancement release.
There are 8 issues fixed in this release.
Enhancements
- 4600 Add
DateTime
/TimeSpan
support for inequality tolerance. Thanks to Michael Render for PR 4618 - 4572 Make new PropertiesComparer optional. Fixed by team PR 4608 Adding modifier UsingPropertiesComparer() to AnyOf-, Equal-, SomeItems-, CollectionEquivalent-, CollectionSubset-, CollectionSuperSet-, DictionaryContainsKey-, DictionaryContainsKeyValuePair-, DictionaryContainsValue- and UniqueItemsConstraint.
- 1215 Explicit specification of generic method types on TestCase and TestCaseSource. Fixed by team PR 4620 See TestCase and TestCaseSource documentation.
Bug fixes
- 4602 WpfMessagePumpStrategy - change from Dispatcher.Run to Dispatcher.PushFrame . Thanks to soerendd for PR 4603
- 4591 Parameter count mismatch with indexer. Fixed by team PR 4608
- 4581 NUnit 4 needs System.Threading.Tasks.Extensions for net472 tests. Fixed by team PR 4582
Refactorings
Internal fixes
Deprecated features
None
The following issues are marked as breaking changes
None.
Be aware that in version 4.0 the different equality constraints included checking properties of objects. That was a breaking change from earlier versions, and has now been replaced with an UsingPropertiesComparer() modifier, making this optional.
NUnit 4.0.1 - December 2. 2023
This is a hotfix release for three issues related to targeting windows targets, like net6.0-windows
. If you don't use these targets, you can safely ignore this release.
For more details, see the information in the issues below:
Bug fixes
- 4571 NUnit 4: dotnet test behaving differently locally vs on GH Actions (failing). Fixed by team PR 4574
- 4565 Unable to test project targeting net8.0-windows and win-x64 . Fixed by team PR 4569
- 4564 Tests not discovered for .NET Windows-specific TFM without Windows build number. Fixed by team PR 4569
NUnit 4.0.0 - November 26. 2023
This release is an incremental improvement of 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.
If you use the NUnit Console
, you will need version 3.15.3
or later (but not any 3.16.X versions)).
The minimum target framework supported is now dotnet framework 4.6.2
, and .net 6.0
.
See the planning notes for more information about the changes.
See the migration guide for how to move your projects from NUnit 3 to NUnit 4.
Credits
All issues marked "Fixed by team" has been done by the members of the framework team.
Issues marked "Thanks to" has been done by external contributors. We appreciate all the work all these people have been doing!
There are 112 issues fixed in this release.
Enhancements
- 4551 Make ConstraintExpression.AnyOf() accept IEnumerable. Thanks to Ivan Gurin for PR 4552
- 4521 Proposal: Async test case sources . Fixed by team PR 4389
- 4489 Use buffer pooling when calculating partition filters. Fixed by team PR 4500
- 4476 Add support to
StreamsComparer
for non-seek able streams. Thanks to Michael Render for PR 4483 - 4433 Add string syntax attributes (.NET 7+). Thanks to Michael Render for PR 4425
- 4431 Improving error message handling and performing assert consolidation. Fixed by team PR 4430
- 4421 Add support for native .NET-6.0 target . Fixed by team PR 4431
- 4413 Assert.That methods should autogenerate message, if null. Fixed by team PR 4419
- 4394 Expand NUnitEquality to use Equality of all Properties. Fixed by team PR 4436
- 4391 Hash/Partition based Test Filter. Thanks to Andrew Armstrong for PR 4392
- 4385 Add support for Test Cancellation. Fixed by team PR 4386
- 4355 Allow Is.AnyOf to be called with arrays or other collections. Fixed by team PR 4356
- 4149 Distribute optimized framework builds with easy debugging. Thanks to Marko Lahma for PR 4350
- 4144 Stderr/Console.Error will hold back Unicode escaped log messages. Thanks to Max Schmitt for PR 4145
- 4101 Expose ExpectedResult to the TestContext. Fixed by team PR 4239
- 4086 Perform case-insensitive string comparisons in-place. Fixed by team PR 4088
- 4053 Cache method discovery by migrating PR 4034 to main. Fixed by team PR 4208
- 3984 Add net6.0 targets. Fixed by team PR 3988
- 3941 PlatformAttribute has AllowMultiple = true, but that doesn't work. Fixed by team PR 3926
- 3936 Is there any way we could make use of CallerArgumentExpressionAttribute?. Fixed by team PR 4419
- 3899 Allow randomizing 'Guid' test arguments with [Random]. Thanks to Arnaud TAMAILLON for PR 3951
- 3866 SupportedOSPlatform. Fixed by team PR 3926
- 3856 Theories in nested Testfixtures. Thanks to Felix Kr”ner for PR 3857
- 3718 Improve readability of "assert failed" message for DictionaryContainsKeyValuePairConstraint WithValue(). Fixed by team PR 3778
- 3457 Add DefaultConstraint. Thanks to Oleksandr Liakhevych for PR 3781
- 3432 Assert.That is blocking and might lead to deadlock when used with WCF.. Thanks to Gavin Lambert for PR 4322
- 3391 TestCaseSource to recognize new async streams. Fixed by team PR 4538
- 3376 Nullable Reference Types annotations. Fixed by team through multiple PRs. . Fixed by team PR 3488
- 3043 Add AsyncEnumerable support for TestCaseSource, ValueSource, and TestFixtureSource. Fixed by team PR 4538
- 2843 Replacing ThrowsAsync with a composable async alternative. Thanks to Gavin Lambert for PR 4322
- 1459 Support for params keyword in parameterized test fixtures. Thanks to Leo Shine for PR 4478
- 4391 Hash/Partition based Test Filter. Thanks to Andrew Armstrong for PR 4392
- 3936 Is there any way we could make use of CallerArgumentExpressionAttribute?. Fixed by team PR 4419
- 3798 Support abstract methods marked as tests. Fixed by team PR 4490
Bug fixes
- 4554 SetUpFixture has stopped working going from NUnit 3.13.3 to 3.14.0/4.0.0-beta.1. Fixed by team PR 4555
- 4532 Assert.That no longer allows 'null' message. Fixed by team PR 4533
- 4529 Forwardport: Missing stack trace when exception occurs during OneTimeSetUp #2466. Fixed by team PR 4469
- 4528 Forwardport: Is.SupersetOf and Is.SubsetOf no longer work with ImmmutableDictionary<TKey,TValue> in NUnit 3.13.3 #4095. Fixed by team PR 4098
- 4522 Missing stack trace when exception occurs during OneTimeSetUp #2466. Fixed by team PR 4469
- 4491 NUnit 4.0 fails when [Repeat] is present and test passes. Fixed by team PR 4517
- 4484 String not-regex constraint succeeds non-
string
actual value. Thanks to Michael Render for PR 4492 - 4450 Missing comparison failure details for EqualTo when comparing two collection. Thanks to Ashish Dawale for PR 4502
- 4423 Chaining multiple collection asserts with index. Thanks to Daniel Waechtler for PR 4480
- 4400 Within throws ArgumentException if null value is involved. Thanks to Ashish Dawale for PR 4482
- 4319 TextRunner accidentally disposes System.Out. Thanks to Norm Johanson for PR 4317
- 4308 Random attribute with Distinct and wide range causes test to disappear. Thanks to Russell Smith for PR 4316
- 4264 Assert.Multiple method should fail only if a contained assertion failed. Thanks to Samuel Delarosbil for PR 4313
- 4259 Bug: Assert.That(IEnumerable<Type>, Has.All.Property(nameof(Type.Namespace)) fails.. Fixed by team PR 4260
- 4255 InternalTrace.Initialize fails with Nullref exception. Fixed by team PR 4256
- 4246 Stack overflow when running tests on machine with Thai regional format. Fixed by team PR 4345
- 4243 Type args are not deduced correctly for parameterized fixtures. Thanks to Samuel Delarosbil for PR 4307
- 4237 Bogus check for Windows 11. Fixed by team PR 4374
- 4158 SetupFixture should have an
AttributeUsage
ofInherited = false
. Thanks to TillW for PR 4222 - 4107 Incorrect type specified for Values attribute fails unrelated tests. Fixed by team PR 4133
- 4096 NUnit.Framework 3.13.2 introduced a breaking change that conceals problems with tests. Fixed by team PR 4133
- 3964 DictionaryContainsKeyValuePairConstraint doesn't work with
IDictionary<TKey, TValue>
. Thanks to Louis Zanella for PR 4014 - 3961 OneTimeTearDown runs on a new thread with mismatched Thread Name and Worker Id. Thanks to EraserKing for PR 4004
- 3953 Dispose is not called on test fixtures with LifeCycle.InstancePerTestCase without TearDown method. Fixed by team PR 3963
- 3872 Add support for
ref bool
,ref bool?
,in bool
, andin bool?
when usingNUnit.Framework.ValuesAttribute
. Thanks to Samuel Delarosbil for PR 4304 - 3868 Order attribute skips classes with multiple test fixtures. Thanks to Samuel Delarosbil for PR 4304
- 3867 nunit Framework tests do not run with "dotnet test" nor inside VS2019 (Windows). Fixed by team PR 4315
- 3858 Running tests with ITestAction attributes leaks memory. Thanks to Marko Lahma for PR 4300
- 3811 Incorrect summary comments on Warn.If overloads. Fixed by team PR 3845
- 3735 Parallelizable TestFixtureSource with TestFixtureData not running in parallel. Thanks to Julien Richard for PR 4099
- 3449 Assert.AreEqual overloads for nullable double are not useful. Thanks to Anton Ashmarin for PR 3780
- 3274 Overridden tests are not discovered in NUnit 3.12.0. Fixed by team PR 4490
- 3215 Better error message for generic test where type parameter cannot be determined. Thanks to Ove Bastiansen for PR 4382
- 2870 CollectionTally (EquivalentTo) should throw for non-transitive comparisons. Thanks to Russell Smith for PR 4312
- 2841 DelayedConstraint calls delegate twice. Fixed by team PR 4488
- 2835 Control character encoding is inconsistent between TestCase[Source] and TestFixture[Source]. Fixed by team PR 4498
- 2436 Properties on System.Type cannot be used with either property constraint. Fixed by team PR 4259
- 1428 NUnitLite package always installs both Program.cs and Program.vb. Fixed by team PR 3952
Refactorings
- 4539 Upgrade to latest analyzers package and fix the warnings.
- 4434 Fixing the classic asserts. Fixed by team PR 4438
- 4416 Move classic asserts into its own project . Fixed by team PR 4417
- 4380 Consistently use _ prefix for field names. Fixed by team PR 4387
- 4378 Update code base to use 'is (not) null' consistently. Fixed by team PR 4379
- 4376 Update code base to explicitly specify accessibility. Fixed by team PR 4377
- 4364 Add NUnit.Analyzer to our test projects. Fixed by team PR 4366
- 4111
Is.Empty
constraint on complex collections might hide bugs. Thanks to Felix Kr”ner for PR 4120 - 4051 Update codebase to use Array.Empty<T>. Thanks to Marcin Jedrzejek for PR 4127
- 3932 Make
Numerics
class internal. Thanks to TillW for PR 4205
Internal fixes
- 4503 Add NET8 target for the framework tests. Thanks to Ashish Dawale for PR 4511
- 4432 Fix null message in internal static string? ExtendedMessage(string methodName, string? message, string actualExpression, string constraintExpression). Fixed by team PR 4430
- 4331 Add testing to "Accumulate further failures if any on AssertMultiple instead of throwing". Thanks to Samuel Delarosbil for PR 4313
- 4212 Add Windows11 support to the Platform attribute. Fixed by team PR 4213
- 4170 Add .NET7 as a build target for the test suite . Fixed by team PR 4224
- 4078 THREAD_ABORT not properly set. Fixed by team PR 4079
- 4075 Remove unnecessary allocations in NUnitEqualityComparer. Fixed by team PR 4076
- 4072 Use pattern matching in Constraints to avoid unnecessary casts. Fixed by team PR 4073
- 4065 Use pattern matching in the comparers. Fixed by team PR 4066
- 4055 Use static Regex.IsMatch in ValueMatchFilter to take advantage of caching. Fixed by team PR 4056
- 4049 Simplify property retrieval in DefaultTestAssemblyBuilder.Build(). Thanks to Scott Buchanan for PR 4054
- 3935
Numerics.IsFixedPointNumeric
should return false for decimals. Thanks to Wellington Balbo for PR 3942 - 3789 Change copyright header on files. Fixed by team PR 3795
- 3764 Switch to the dotnet tool version of Cake. Fixed by team PR 3835
- 3588 Audit string equality comparisons and consider changes for v4. Fixed by team PR 3770
- 2485 Remove\Trim copyright on individual files. Fixed by team PR 3795
- 4504 Remove appveyor build. Fixed by team PR 4509
- 4465 Update cake version in build scripts. Fixed by team PR 4540
- 4036 Drop net45 build target in nunit4. Fixed by team PR 4050
- 3984 Add net6.0 targets. Fixed by team PR 3988
- 3980 Drop netcoreapp2.1 targets. Fixed by team PR 3988
- 3812 Add GitHub Actions. Fixed by team PR 3819
- 3764 Switch to the dotnet tool version of Cake. Fixed by team PR 3835
- 3758 Drop .NET 3.5 Build Targets. Fixed by team PR 3760
- 2485 Remove\Trim copyright on individual files. Fixed by team PR 3795
Deprecated features
- 4415 Remove use of params for messages. Fixed by team PR 4419
- 4036 Drop net45 build target in nunit4. Fixed by team PR 4050
- 3980 Drop netcoreapp2.1 targets. Fixed by team PR 3988
- 3769 Remove code marked "Obsolete". Fixed by team PR 3836
- 3758 Drop .NET 3.5 Build Targets. Fixed by team PR 3760
- 3708 Drop .NET 4.0 Build Target. Fixed by team PR 3760
- 3410 Consider deprecating NUnitEqualityComparer.AreEqual optional bool parameter. Thanks to TillW for PR 3960
- 3132 Remove AssertionHelper and AssertionHelperTests. Fixed by team PR 3836
Others
- 3869 Copyright notices for third-party code. Thanks to Lennart Brggemann for PR 4444
- 3301 [HandleProcessCorruptedStateExceptions] has no effect unless we disable partial trust. Fixed by team PR 4398
The following issues are marked as breaking changes
- 4416 Move classic asserts into its own project . Fixed by team PR 4417
- 4415 Remove use of params for messages. Fixed by team PR 4419
Also note that there are some breaking changes in the API for NUnit.
Ref Issue 4610.
- Constraint.Description: It is now an abstract get property, earlier a virtual with protected setter.
- PrefixConstraint.DescriptionPrefix: It is now an abstract get property, earlier a virtual with protected setter.
NUnit 3.14.0 - November 4, 2023
Total number of issues fixed in this release is : 16
Enhancements
- 4046 Backport .NET6 test infra + build improvements from #3984 onto v3.13 branch. Fixed by team PR 4077 ( backport of issue 3984)
- 4009 Performance degradation on many tests. Thanks to Marko Lahma for PR 4034
- 3859 Proper test result exception message when hitting
TimeoutAttribute
. Fixed by team PR 4118 - 3601 Nunit 3.10.1.0 + ReSharper 2020.1.4: Test execution delayed by ~60seconds . Thanks to Marko Lahma for PR 4034
- 2729 Proposal: Async test case sources. Fixed by team PR 4390
Bug fixes
- 4527 Backport: NUnit.Framework 3.13.2 introduced a breaking change that conceals problems with tests. Fixed by team PR 4104 ( backport of issue 4096 by pr 4133)
- 4525 Backport: SetupFixture should have an AttributeUsage of Inherited = false . Thanks to TillW for PR 4223 ( backport of issue 4158 by pr 4222)
- 4523 Backport: Stack overflow when running tests on machine with Thai regional format. Fixed by team PR 4346 ( backport of issue 4246 by pr 4345)
- 4324 Backport to v3: TextRunner accidentally disposes System.Out. Thanks to Norm Johanson for PR 4325 ( backport of issue 4319 by pr 4317)
- 4095 Is.SupersetOf and Is.SubsetOf no longer work with IImmmutableDictionary<TKey,TValue> in NUnit 3.13.3. Fixed by team PR 4097
- 3859 Proper test result exception message when hitting
TimeoutAttribute
. Fixed by team PR 4118 - 3710 Calling NUnitLite from LINQpad, can't parse assembly path. Thanks to Norm Johanson for PR 4325
- 2466 Missing stack trace when exception occurs during OneTimeSetUp. Fixed by team PR 4467
Refactorings
None
Internal fixes
- 4524 Backport: Add .NET7 as a build target for the test suite #4170. Fixed by team PR 4302 ( backport of issue 4170 by pr 4224)
- 4293 .NET5 Test Suite is failing on Azure DevOps for Windows. Fixed by team PR 4296
- 2973 Write up recommended way to test and link it from the readme. Thanks to Bruno Juchli for PR 2971
Deprecated features
None
The following issues are marked as breaking changes
None
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 withTestFixtureSource
- 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 inFrameworkControllerTests
- 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 theIMethodInfo
interface - 3275 Enable setting
IgnoreUntilDate
inTestCaseData.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 forIDictionary
- 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
castsITestResult
toTestResult
- 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
toTestResult
- 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
throwsOverflowException
for-0
- 3598 Fix typo
- 3608
[Platform]
attribute fails withDllNotFoundException
in WASM - 3616 Extend
Is.Empty
to work forGuid.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 anyIComparable
) 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
andCurrentUICulture
- 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
withAnd
- 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 anAnyOf
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
- Release Notes for NUnit 2.9.1 through 3.5
- Release Notes for NUnit 2.6 through 2.6.4
- Release Notes for NUnit 2.5 through 2.5.10
- Release Notes for NUnit 2.4 through 2.4.8
- Release Notes for NUnit 2.0 through 2.2.10