We just shipped a new prerelease build of the core framework (3.0.0-pre.40).
There are no new breaking changes, so this will not reset our release clock for 3.0.0 (which should be in about a week).
une bibliothèque pour mocker les ressources #AWS utilisées dans le code de production #Python que vous testez (S3, par exemple) : https://github.com/getmoto/moto
La page https://github.com/getmoto/moto/blob/master/docs/docs/getting_started.rst documente comment écrire les tests (#pytest, #unittest) et donne quelques conseils pour écrire du code de production plus facile à tester (en ce qui concerne les interactions avec boto3, le client vers les services AWS).
{testthat} is great for automatic testing. Here are some tricks for the heavy user: https://blog.r-hub.io/2020/11/18/testthat-utility-belt/ #rstats #testing #unittest #testthat
I wanted a #unittest to prove that adjusting the system #cryptograhy #policy would achieve the intended outcome. 🧵
So made a source generator - ended up rather complex.
But I find unit testing it very tedious when verifying the generated output via Verify.
Is it not possible to load a class/instance as source in the testing, and use it as foundation for the generator. Instead of having to manually writing (and maintaining) the source as a string to then parse into a syntax tree to verify output? I mean it can generate on compile time, so why not at test? :D
We just shipped prerelease builds of core framework (3.0.0-pre.15) and analyzers (1.23.0-pre.3).
This is a major version update with breaking changes. Check the release notes for more information.
https://xunit.net/releases/v3/3.0.0-pre.15
https://xunit.net/releases/analyzers/1.23.0-pre.3
We just shipped core framework v3 2.0.3, analyzers 1.22.0, and Visual Studio adapter 3.1.1.
Check the release notes for new features and bugs fixed.
https://xunit.net/releases/v3/2.0.3
https://xunit.net/releases/analyzers/1.22.0
https://xunit.net/releases/visualstudio/3.1.1
As it turns out, there were some fundamental problems with the testing-strategy I had in mind for testing the PACT processes. That is, problems with how I'd planned to implement those tests, not with which tests needed to be implemented (at least not yet). Those issues took a bit of thinking through, and there were some interesting results from related investigation.
https://goblinfish-code.blogspot.com/2025/05/when-not-to-mock-or-patch.html
We just shipped core framework v3 2.0.2 and Visual Studio adapter 3.1.0.
Check the release notes for new features and bugs fixed.
Note: The Visual Studio adapter has moved up to .NET 8 (from .NET 6).
https://xunit.net/releases/v3/2.0.2
https://xunit.net/releases/visualstudio/3.1.0
Quelques bonnes pratiques pour tester votre application Node.js.
🔗 https://github.com/goldbergyoni/nodejs-testing-best-practices#readme
We have a prototype of the API documentation online: https://api.xunit.net/
We're not sure if it will live on a separate URL forever, but until the main site is rebuilt with DocFX, this is how it has to be for now.
Feedback welcome!
We just shipped core framework v3 2.0.1 and source analyzers 1.21.0.
Check the release notes for new features and bugs fixed.
https://xunit.net/releases/v3/2.0.1
https://xunit.net/releases/analyzers/1.21.0
Nach Null setzen der Klassenvariablen in der tearDown() die die Referenzen hatten gehen die Zähler auch wieder runter und der scheiß fliegt mir nicht mehr um die Ohren 🙌🏼
Damit bleiben natürlich auch diese Instanzen referenziert und werden nicht aufgeräumt.
Mit wachsender Anzahl Testklassen, werdens also auch immer mehr Referenzen die unnötig weiter Platz belegen und 🤯
Hab die Theorie dann eben mal überprüft, indem ich in Kon-/Destruktor der instanziierten Klassen einen Zähler gepackt hab.
Und recht gehabt.
Ich hab mittlerweile so viele Unittests in dieser Suite drin, der VM HeapSpace fliegt mir um die Ohren 😶🌫️
Heute morgen also mal Speicheroptimierung in den Unittests betrieben :blobcatverified:
Was war passiert?
Naja, ich hab in der setUp() 9 Objekte instanziiert und in Klassenvariablen der Testklasse abgelegt.
Well, am Ende des Tests, hält die Testumgebung die Referenz auf alle Testklassen bis sie mit allem fertig ist, für final Reporting. 👀
https://github.com/SwissLife-OSS/snapshooter - SnapShooter is a #dotNET #UnitTest snapshot tool (think Jest snapshots). Run it once, save the result, and every other test run compares to that result. For when you're asserting something big like a rendered email template.