docs/articles/nunit/release-notes/framework.md
This is a patch release for 4.5.0, to fix some regression bugs.
A few other fixes sneaked into the release though.
There are 7 issues fixed in this release.
ITestResult.TotalCount does not seem to behave as specified. Thanks to maettu-this for PR 5127Array as test parameter fails with 4.5.0. Thanks to NUnit Team member Terje Sandstrom for PR 5130We want to express our heartfelt gratitude to everyone who has contributed to this release by reporting bugs, suggesting enhancements, and providing valuable feedback. Your efforts help make NUnit better for the entire community.
A special thank you to the following reporters for identifying issues:
<table> <tr> <td><a href="https://github.com/cbersch">Christoph Bersch</a></td> <td><a href="https://github.com/dd-eg">dd-eg</a></td> <td><a href="https://github.com/JakenVeina">Jake Meiergerd</a></td> <td><a href="https://github.com/maettu-this">maettu-this</a></td> </tr> <tr> <td><a href="https://github.com/michaelmuller12">michaelmuller12</a></td> <td><a href="https://github.com/RalfKoban">Ralf Koban</a></td> <td><a href="https://github.com/stevenaw">Steven Weerdenburg</a></td> </tr> </table>and to the commenters who engaged in discussions and offered further insights:
<table> <tr> <td><a href="https://github.com/freever">Adrian Frielinghaus</a></td> <td><a href="https://github.com/apps/cursor">cursor[bot]</a></td> <td><a href="https://github.com/dd-eg">dd-eg</a></td> <td><a href="https://github.com/flownzu">Florian Jäckel</a></td> </tr> <tr> <td><a href="https://github.com/JakenVeina">Jake Meiergerd</a></td> <td><a href="https://github.com/jzapletal95">Jiří Zapletal</a></td> <td><a href="https://github.com/maettu-this">maettu-this</a></td> <td><a href="https://github.com/manfred-brands">Manfred Brands</a></td> </tr> <tr> <td><a href="https://github.com/michaelmuller12">michaelmuller12</a></td> <td><a href="https://github.com/mikkelbu">Mikkel Nylander Bundgaard</a></td> <td><a href="https://github.com/RichardR-cg">Richard R.</a></td> <td><a href="https://github.com/rprouse">Rob Prouse</a></td> </tr> <tr> <td><a href="https://github.com/simontom">Saymon</a></td> <td><a href="https://github.com/stevenaw">Steven Weerdenburg</a></td> <td><a href="https://github.com/OsirisTerje">Terje Sandstrom</a></td> </tr> </table>This release introduce Execution Hooks, a finegrained way of hooking into the different stages of a test execution.
The documentation describe the way you can make your own hooks to tap into this. There are five stages, and you can hook in both Before and After the stage has run.
Assert.AreEqual and friends are back! In this release we could take advantage of the new extension method mechanism for static classes introduced in C# 14, and thus bring these back into the NUnit.Framework namespace!
In this release 40 different enchancements and bug fixes have been done.
Enum.Parse<T>() method for .NET Framework builds. Thanks to Shaig Mahmudov for PR 5102Assert.IsNotNull, Assert.IsFalse etc.?. Thanks to NUnit Team member Terje Sandstrom for PR 5054Console.Write where ExecutionContext flow is suppressed is never written. Thanks to Joost Koehoorn for PR 5121AssignableTo/From among value types. Thanks to NUnit Team member Steven Weerdenburg for PR 5083TestContext.CurrentContext.Test.AllCategories() is not thread-safe. Thanks to NUnit Team member Manfred Brands for PR 5053Repeat attribute only prints output of last repetition after 4.4.0 update. Thanks to NUnit Team member Manfred Brands for PR 5038browser-wasm runtime. Thanks to NUnit Team member Manfred Brands for PR 5024None
None
None
We want to express our heartfelt gratitude to everyone who has contributed to this release by reporting bugs, suggesting enhancements, and providing valuable feedback. Your efforts help make NUnit better for the entire community.
A special thank you to the following reporters for identifying issues:
<table> <tr> <td><a href="https://github.com/afscrome">Alex Crome</a></td> <td><a href="https://github.com/ant-jones-rg">Ant Jones</a></td> <td><a href="https://github.com/arminthecook">arminthecook</a></td> <td><a href="https://github.com/bording">Brandon Ording</a></td> </tr> <tr> <td><a href="https://github.com/astrohart">Brian</a></td> <td><a href="https://github.com/BrunoJuchli">Bruno Juchli</a></td> <td><a href="https://github.com/ChrisMaddock">Chris Maddock</a></td> <td><a href="https://github.com/ackhack">Christoph Fürbacher</a></td> </tr> <tr> <td><a href="https://github.com/Gwindalmir">Daniel</a></td> <td><a href="https://github.com/eberzosa">eberzosa</a></td> <td><a href="https://github.com/doxxx">Gordon Tyler</a></td> <td><a href="https://github.com/JoostK">Joost Koehoorn</a></td> </tr> <tr> <td><a href="https://github.com/jnm2">Joseph Musser</a></td> <td><a href="https://github.com/julealgon">Juliano Leal Goncalves</a></td> <td><a href="https://github.com/lrampazzo">Luca Rampazzo</a></td> <td><a href="https://github.com/maettu-this">maettu-this</a></td> </tr> <tr> <td><a href="https://github.com/manfred-brands">Manfred Brands</a></td> <td><a href="https://github.com/mikkelbu">Mikkel Nylander Bundgaard</a></td> <td><a href="https://github.com/miroljub1995">Miroljub Tomic</a></td> <td><a href="https://github.com/oznetmaster">Neil Colvin</a></td> </tr> <tr> <td><a href="https://github.com/radim-bernatik-veeam">Radim Bernatik</a></td> <td><a href="https://github.com/randersen">randersen</a></td> <td><a href="https://github.com/rprouse">Rob Prouse</a></td> <td><a href="https://github.com/reejk">Roman</a></td> </tr> <tr> <td><a href="https://github.com/MgSam">Sam</a></td> <td><a href="https://github.com/seanm-fathomhq">Sean Mackedie</a></td> <td><a href="https://github.com/TSAVogt">Stefan Vogt</a></td> <td><a href="https://github.com/stevenaw">Steven Weerdenburg</a></td> </tr> <tr> <td><a href="https://github.com/OsirisTerje">Terje Sandstrom</a></td> <td><a href="https://github.com/paatrofimov">Trofimov Pavel</a></td> </tr> </table>and to the commenters who engaged in discussions and offered further insights:
<table> <tr> <td><a href="https://github.com/ant-jones-rg">Ant Jones</a></td> <td><a href="https://github.com/Bouke">Bouke Haarsma</a></td> <td><a href="https://github.com/bording">Brandon Ording</a></td> <td><a href="https://github.com/nobrayner">Braydon Hall</a></td> </tr> <tr> <td><a href="https://github.com/astrohart">Brian</a></td> <td><a href="https://github.com/BrunoJuchli">Bruno Juchli</a></td> <td><a href="https://github.com/CharliePoole">CharliePoole</a></td> <td><a href="https://github.com/ChrisMaddock">Chris Maddock</a></td> </tr> <tr> <td><a href="https://github.com/ackhack">Christoph Fürbacher</a></td> <td><a href="https://github.com/cPetru">cPetru</a></td> <td><a href="https://github.com/d-Z-b">d-Z-b</a></td> <td><a href="https://github.com/delgesso">delgesso</a></td> </tr> <tr> <td><a href="https://github.com/nyghtly-derek">Derek Blankenship</a></td> <td><a href="https://github.com/DJDoena">DJ Doena</a></td> <td><a href="https://github.com/JoostK">Joost Koehoorn</a></td> <td><a href="https://github.com/jnm2">Joseph Musser</a></td> </tr> <tr> <td><a href="https://github.com/julealgon">Juliano Leal Goncalves</a></td> <td><a href="https://github.com/xenaree">Kais</a></td> <td><a href="https://github.com/LirazShay">Liraz Shay</a></td> <td><a href="https://github.com/lrampazzo">Luca Rampazzo</a></td> </tr> <tr> <td><a href="https://github.com/manfred-brands">Manfred Brands</a></td> <td><a href="https://github.com/siburny">Maxim Rubis</a></td> <td><a href="https://github.com/RenderMichael">Michael Render</a></td> <td><a href="https://github.com/mikkelbu">Mikkel Nylander Bundgaard</a></td> </tr> <tr> <td><a href="https://github.com/miroljub1995">Miroljub Tomic</a></td> <td><a href="https://github.com/mitchellmaler">Mitchell Maler</a></td> <td><a href="https://github.com/oznetmaster">Neil Colvin</a></td> <td><a href="https://github.com/radim-bernatik-veeam">Radim Bernatik</a></td> </tr> <tr> <td><a href="https://github.com/TravellerD14">Rajiv Sinha</a></td> <td><a href="https://github.com/randersen">randersen</a></td> <td><a href="https://github.com/renemadsen">René Schultz Madsen</a></td> <td><a href="https://github.com/rprouse">Rob Prouse</a></td> </tr> <tr> <td><a href="https://github.com/reejk">Roman</a></td> <td><a href="https://github.com/MgSam">Sam</a></td> <td><a href="https://github.com/phyrik">Scott Buchanan</a></td> <td><a href="https://github.com/shaig-mahmudov">Shaig Mahmudov</a></td> </tr> <tr> <td><a href="https://github.com/savornicesei">Simona Avornicesei</a></td> <td><a href="https://github.com/Sputnik24">Sputnik24</a></td> <td><a href="https://github.com/Stan-RED">Stanislav S. Yarmonov</a></td> <td><a href="https://github.com/z002Holpp">Stefan Holpp</a></td> </tr> <tr> <td><a href="https://github.com/TSAVogt">Stefan Vogt</a></td> <td><a href="https://github.com/stevenaw">Steven Weerdenburg</a></td> <td><a href="https://github.com/tekhedd">tekHedd</a></td> <td><a href="https://github.com/OsirisTerje">Terje Sandstrom</a></td> </tr> <tr> <td><a href="https://github.com/TomEdwardsEnscape">Tom Edwards</a></td> <td><a href="https://github.com/paatrofimov">Trofimov Pavel</a></td> <td><a href="https://github.com/zahran001">Zahran Yahia Khan</a></td> </tr> </table>This release contains bug fixes and smaller enhancements, with 26 issues fixed.
Assert.That(i, Is.Even);/Assert.That(i, Is.Odd); and Assert.That(i, Is.MultipleOf(step));. Thanks to NUnit Team member Manfred Brands for PR 4946PropertyConstraint Causes Unexpected Behavior Because the Property's Value Is object Instead of the Property's Actual Type. Thanks to LeQuackers for PR 5003Is.EqualTo(DateTime) constraint in 4.3.x for types that implement IEquatable<DateTime>. Thanks to NUnit Team member Manfred Brands for PR 4957PartitionFilter.ComputeHasValue throws exception when test name is greater than 4096 characters. Thanks to Will Ray for PR 4941_innerResult for WriteMessageTo . Thanks to NUnit Team member Manfred Brands for PR 4922IConstraint.Apply<TActual>(ref TActual). Thanks to NUnit Team member Manfred Brands for PR 4944None
IConstraint.Apply<TActual>(ref TActual). Thanks to NUnit Team member Manfred Brands for PR 4944This is technically breaking, and is marked as obsolete. It is not used by NUnit code, but some externals may use it. If you do, please read the issue, and move away from this. It will be removed in next version.
We want to express our heartfelt gratitude to everyone who has contributed to this release by reporting bugs, suggesting enhancements, and providing valuable feedback. Your efforts help make NUnit better for the entire community.
A special thank you to the following reporters for identifying issues:
<table> <tr> <td><a href="https://github.com/Taron-art">Artur Kharin</a></td> <td><a href="https://github.com/KrzysFR">Christophe Chevalier</a></td> <td><a href="https://github.com/metoule">Christophe PLAT</a></td> <td><a href="https://github.com/Rabadash8820">Dan Vicarel</a></td> </tr> <tr> <td><a href="https://github.com/Edgaras91">Edgaras</a></td> <td><a href="https://github.com/verdie-g">Gr‚goire</a></td> <td><a href="https://github.com/IgorVyatkin">Igor Vyatkin</a></td> <td><a href="https://github.com/Bartleby2718">Jihoon Park</a></td> </tr> <tr> <td><a href="https://github.com/appel1">Johan Appelgren</a></td> <td><a href="https://github.com/killergege">Julien Nigay</a></td> <td><a href="https://github.com/juergstaub">Jrg Staub</a></td> <td><a href="https://github.com/LeQuackers">LeQuackers</a></td> </tr> <tr> <td><a href="https://github.com/maettu-this">maettu-this</a></td> <td><a href="https://github.com/manfred-brands">Manfred Brands</a></td> <td><a href="https://github.com/Dreamescaper">Oleksandr Liakhevych</a></td> <td><a href="https://github.com/Sputnik24">Sputnik24</a></td> </tr> <tr> <td><a href="https://github.com/SFrank1966">Stefan Frank</a></td> <td><a href="https://github.com/stevenaw">Steven Weerdenburg</a></td> <td><a href="https://github.com/OsirisTerje">Terje Sandstrom</a></td> <td><a href="https://github.com/WillRayAtPropertyMe">Will Ray</a></td> </tr> </table>and to the commenters who engaged in discussions and offered further insights:
<table> <tr> <td><a href="https://github.com/anders9ustafsson">Anders Gustafsson</a></td> <td><a href="https://github.com/agray">Andrew Gray</a></td> <td><a href="https://github.com/CharliePoole">CharliePoole</a></td> <td><a href="https://github.com/cfuerbachersparks">Christoph</a></td> </tr> <tr> <td><a href="https://github.com/metoule">Christophe PLAT</a></td> <td><a href="https://github.com/Rabadash8820">Dan Vicarel</a></td> <td><a href="https://github.com/schrufygroovy">David Schruf</a></td> <td><a href="https://github.com/Edgaras91">Edgaras</a></td> </tr> <tr> <td><a href="https://github.com/glassesarms">ethan</a></td> <td><a href="https://github.com/verdie-g">Gr‚goire</a></td> <td><a href="https://github.com/IgorVyatkin">Igor Vyatkin</a></td> <td><a href="https://github.com/Bartleby2718">Jihoon Park</a></td> </tr> <tr> <td><a href="https://github.com/appel1">Johan Appelgren</a></td> <td><a href="https://github.com/jnm2">Joseph Musser</a></td> <td><a href="https://github.com/killergege">Julien Nigay</a></td> <td><a href="https://github.com/juergstaub">Jrg Staub</a></td> </tr> <tr> <td><a href="https://github.com/LeQuackers">LeQuackers</a></td> <td><a href="https://github.com/maettu-this">maettu-this</a></td> <td><a href="https://github.com/manfred-brands">Manfred Brands</a></td> <td><a href="https://github.com/mikkelbu">Mikkel Nylander Bundgaard</a></td> </tr> <tr> <td><a href="https://github.com/Dreamescaper">Oleksandr Liakhevych</a></td> <td><a href="https://github.com/pembebiri">pembebiri</a></td> <td><a href="https://github.com/SeanKilleen">Sean Killeen</a></td> <td><a href="https://github.com/siva1160github">Sivasubramanian T</a></td> </tr> <tr> <td><a href="https://github.com/Sputnik24">Sputnik24</a></td> <td><a href="https://github.com/Star62enis">Star62enis</a></td> <td><a href="https://github.com/SFrank1966">Stefan Frank</a></td> <td><a href="https://github.com/stevenaw">Steven Weerdenburg</a></td> </tr> <tr> <td><a href="https://github.com/OsirisTerje">Terje Sandstrom</a></td> <td><a href="https://github.com/vvidetta-gearset">Vito Videtta</a></td> <td><a href="https://github.com/WillRayAtPropertyMe">Will Ray</a></td> <td><a href="https://github.com/zaidonolsen">zaidonolsen</a></td> </tr> </table>This is a hotfix release for a regression bug, and also fixes the version numbers of the assembly DLLs.
There are 2 issues fixed in this release.
.csproj file.We want to express our heartfelt gratitude to everyone who has contributed to this release by reporting bugs, suggesting enhancements, and providing valuable feedback. Your efforts help make NUnit better for the entire community.
A special thank you to the following reporters for identifying issues:
<table> <tr> <td><a href="https://github.com/astrohart">Brian</a></td> <td><a href="https://github.com/shlomi-borovitz-greenroad">shlomi-borovitz-greenroad</a></td> </tr> </table>and to the commenters who engaged in discussions and offered further insights:
<table> <tr> <td><a href="https://github.com/manfred-brands">Manfred Brands</a></td> <td><a href="https://github.com/Dreamescaper">Oleksandr Liakhevych</a></td> <td><a href="https://github.com/shlomi-borovitz-greenroad">shlomi-borovitz-greenroad</a></td> <td><a href="https://github.com/stevenaw">Steven Weerdenburg</a></td> </tr> <tr> <td><a href="https://github.com/OsirisTerje">Terje Sandstrom</a></td> </tr> </table>This is a hotfix release to address a type safety issue that broke when some classes had implicit conversion operators.
We had 3 bugs reported, they are all fixed by the same Pull Request.
In addition, a small internal build issue was fixed.
We want to express our heartfelt gratitude to everyone who has contributed to this release by reporting bugs, suggesting enhancements, and providing valuable feedback. Your efforts help make NUnit better for the entire community.
A special thank you to the following reporters for identifying issues:
and to the commenters who engaged in discussions and offered further insights:
This release includes a series of enhancements and bug fixes. Notably, some of the bug fixes address issues related to a lack of type safety in NUnit. See issues 4877, 4876, 4875, 4874 and 150.
Be aware that this might cause compile errors in cases where the code was previously ignored. These errors can be safely resolved by removing the affected code.
There are 29 issues fixed in this release.
Contains.Key(...).WithValue(...). Thanks to Michael Render for PR 4854None
StringUtil.Compare() and update references in the tests. Thanks to Sergio L. for PR 4827None
None
First and foremost, we want to recognize the exceptional contributions of team members Manfred Brands and Steven Weerdenburg for their dedicated efforts on this release, particularly their work on improving type safety.
We also express our heartfelt gratitude to everyone who has contributed to this release by reporting bugs, suggesting enhancements, and providing valuable feedback. Your efforts help make NUnit better for the entire community.
A special thank you to the following reporters for identifying issues:
<table> <tr> <td><a href="https://github.com/cfuerbachersparks">Christoph</a></td> <td><a href="https://github.com/KrzysFR">Christophe Chevalier</a></td> <td><a href="https://github.com/Cincidial">Cincidial</a></td> <td><a href="https://github.com/jnm2">Joseph Musser</a></td> </tr> <tr> <td><a href="https://github.com/Lachstec">Leon Lux</a></td> <td><a href="https://github.com/manfred-brands">Manfred Brands</a></td> <td><a href="https://github.com/MaxKot">MaxKot</a></td> <td><a href="https://github.com/MCMrARM">MCMrARM</a></td> </tr> <tr> <td><a href="https://github.com/RenderMichael">Michael Render</a></td> <td><a href="https://github.com/michaelamaura">Michaela Maura Elschner</a></td> <td><a href="https://github.com/mzh3511">mzh3511</a></td> <td><a href="https://github.com/Dreamescaper">Oleksandr Liakhevych</a></td> </tr> <tr> <td><a href="https://github.com/RaffaelCH">Raffael Botschen</a></td> <td><a href="https://github.com/biocoder-frodo">Sander</a></td> <td><a href="https://github.com/Saurav-shres">Saurav-shres</a></td> <td><a href="https://github.com/seesharks">seesharks</a></td> </tr> <tr> <td><a href="https://github.com/stevenaw">Steven Weerdenburg</a></td> <td><a href="https://github.com/OsirisTerje">Terje Sandstrom</a></td> <td><a href="https://github.com/wimvangool">Wim van Gool</a></td> </tr> </table>and to the commenters who engaged in discussions and offered further insights:
<table> <tr> <td><a href="https://github.com/CharliePoole">CharliePoole</a></td> <td><a href="https://github.com/ChrisMaddock">Chris Maddock</a></td> <td><a href="https://github.com/cfuerbachersparks">Christoph</a></td> <td><a href="https://github.com/KrzysFR">Christophe Chevalier</a></td> </tr> <tr> <td><a href="https://github.com/Cincidial">Cincidial</a></td> <td><a href="https://github.com/Kooddammn">Harsh Jain</a></td> <td><a href="https://github.com/jnm2">Joseph Musser</a></td> <td><a href="https://github.com/Lachstec">Leon Lux</a></td> </tr> <tr> <td><a href="https://github.com/manfred-brands">Manfred Brands</a></td> <td><a href="https://github.com/MaxKot">MaxKot</a></td> <td><a href="https://github.com/RenderMichael">Michael Render</a></td> <td><a href="https://github.com/michaelamaura">Michaela Maura Elschner</a></td> </tr> <tr> <td><a href="https://github.com/mikkelbu">Mikkel Nylander Bundgaard</a></td> <td><a href="https://github.com/Dreamescaper">Oleksandr Liakhevych</a></td> <td><a href="https://github.com/PicNet">PicNet</a></td> <td><a href="https://github.com/RaffaelCH">Raffael Botschen</a></td> </tr> <tr> <td><a href="https://github.com/rprouse">Rob Prouse</a></td> <td><a href="https://github.com/rsjackson3">rsjackson3</a></td> <td><a href="https://github.com/sba-schleupen">Sascha Bartl</a></td> <td><a href="https://github.com/Saurav-shres">Saurav-shres</a></td> </tr> <tr> <td><a href="https://github.com/mr-sergito">Sergio L.</a></td> <td><a href="https://github.com/stevenaw">Steven Weerdenburg</a></td> <td><a href="https://github.com/OsirisTerje">Terje Sandstrom</a></td> <td><a href="https://github.com/wimvangool">Wim van Gool</a></td> </tr> </table>This hotfix addresses an issue with asynchronous behavior introduced in version 4.2.0. It resolves a regression bug that affected the release.
TestCaseSourceAttribute. Fixed by PR 4804This is a hotfix release for 4.2.0, fixing issues related to .NET Framework.
EqualConstraint fails with missing assembly references on .NET Framework since NUnit 4.2.There are 37 issues fixed in this release.
IgnoreAttribute.Reason. Thanks to Michael Render for PR 4781StreamsComparer for happy path. Thanks to Mithilesh Zavar for PR 4668TestContext.CurrentContext.Test.Properties from TestFixture should be available from TestContext for Test. Fixed by team PR 4757DefaultFloatingPointTolerance ignored for TestCaseData. Fixed by team PR 4754.ContainKey().WithValue() and .Or/.And interact incorrectly. Fixed by team PR 4672ValueTask is not being properly consumed by the AwaitAdapter. Fixed by team PR 4640None
Using<TCollectionType, TMemberType> is unclear. Thanks to Michael Render for PR 4729None
This release is a bugfix and smaller enhancement release.
There are 8 issues fixed in this release.
DateTime/TimeSpan support for inequality tolerance. Thanks to Michael Render for PR 4618None
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.
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:
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.
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.
StreamsComparer for non-seek able streams. Thanks to Michael Render for PR 4483string actual value. Thanks to Michael Render for PR 4492AttributeUsage of Inherited = false. Thanks to TillW for PR 4222IDictionary<TKey, TValue>. Thanks to Louis Zanella for PR 4014ref bool, ref bool?, in bool, and in bool? when using NUnit.Framework.ValuesAttribute. Thanks to Samuel Delarosbil for PR 4304Is.Empty constraint on complex collections might hide bugs. Thanks to Felix Kr”ner for PR 4120Numerics class internal. Thanks to TillW for PR 4205Numerics.IsFixedPointNumeric should return false for decimals. Thanks to Wellington Balbo for PR 3942Also note that there are some breaking changes in the API for NUnit.
Ref Issue 4610.
Total number of issues fixed in this release is : 16
TimeoutAttribute. Fixed by team PR 4118TimeoutAttribute. Fixed by team PR 4118None
None
None
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.
[DoesNotReturn] annotations" from #3958This 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.
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.
FixtureLifeCycle(LifeCycle.InstancePerTestCase) Not working with
TestFixtureSourceFixtureLifeCycle(LifeCycle.InstancePerTestCase)
doesn't workEqualTo().Within().Seconds does not work with DateTimes in
NUnit 3.13AreEqual.Within throws on failure with non-numeric typesFixtureLifeCycle.InstancePerTestCaseThe 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.
Has.Property cannot see explicit interface implementation
propertiesNUnitEqualityComparer.GetEquatableGenericArguments should
explicitly order argumentsAssert.AreEqual fails for Complex on LinuxEqualTo().Using() prevents caller from comparing strings to
anything elseExplicit attribute can not be run when
selected by nameDebugWriter class--explore:nunit3 is run on entire
project, but omitted when using the --where clause[Timeout] when debugger is attachedRunAsyncAction tests in FrameworkControllerTestsRandomizer.NextDecimal(decimal)RawInt32() can't use Next since the maximum is always exclusive
and it would never return int.MaxValueTestTimeoutDoesNotStopCompletion
occasionally fails the macOS buildIRepeatTest only gets attributes via the IMethodInfo
interfaceIgnoreUntilDate in TestCaseData.IgnoreUniqueItemsConstraintTimeoutAttribute makes all Assertions count as failureExecutionContext is flowed between unrelated testsExceptionHelper.GetExceptionMessage(Exception ex) should tolerate
exceptions from exceptionsAssert.MultipleCheckString should not be a generic methodGetResultIsNotCalledUntilContinued failureEnumerablesComparerEventListenerTextWriterDateTime in the report when Test was
started/endedProviderCache and make it instantiable since it is
intentionally not thread safeAssert.DoesNotThrow() stopped working as it was previouslyAwaitAdapter terminologyCHANGES.mdContains.Key no longer working for IDictionarySetUpFixture not runTestResult.xml total
countSetUpFixture not being triggered when running tests using
--testlistThread.CurrentPrincipal in Blazor/WASMRandomizer.NextString() can probably be sped upTestResult.cs casts ITestResult to TestResultIs.EqualTo(...).Using(StructuralComparisons.StructuralEqualityComparer or StructuralComparer) not working<code> (block element) instead of
<c> (inline element)MultipleAssertException.TestResult maybe-null or
obsolete two constructors?ITestResult to TestResultValueTuple tests now running if not targeting NET35DelayedConstraint constrains does not preserve original result
additional informationPrivateAssets="all" to analyzer dependencyMessagePumpStrategy does not work for WPF on netcoreapp3.0 and
upwardsTextMessageWriter output for numeric valuesPlatformAttributeEndsWith in common codeTestNameGeneratorAreAlmostEqualUlps throws OverflowException for -0[Platform] attribute fails with DllNotFoundException in WASMIs.Empty to work for Guid.EmptyEmptyDirectoryConstraint doesn't need to enumerate entire
directory contentsAssert.Inconclusive() reports failed when timeout usedIComparable<float> (or any IComparable) fails
comparison.TestContext.CurrentContext.CurrentRepeatCount only contains retry
count not the repeat countCurrentCulture and
CurrentUICultureParallelizeable tests sometimes shares memorySetUpFixturesThis 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.
Contains.Substring with Andchar comparison in v3.7 and higherrepository metadata..IgnoreCase modifier to an AnyOf constraint in
collection constraintsAdded a namespace to the props file included in the NuGet package to make it compatible with versions of Visual Studio prior to VS 2017.
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.
build -t build firstSimpleEnumerableWithIEquatable test object@oznetmaster--nocolor optionThis 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.
<T>(Predicate<T>) throws ArgumentException or Fails when
actual is nullThis 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.
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.
This is a hotfix release that addresses occasional hangs when using test parallelization and fixes crashes in NCrunch prior to version 3.9.
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.
NETSTANDARD1_6--timeout is supplied on command lineThis is a hotfix release of the framework that addresses critical issues found in the 3.6 release.
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.
ICollection<T> is a list