#UnitTest

2025-05-03

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).

xunit.net/releases/v3/2.0.2
xunit.net/releases/visualstudi

#DotNet #CSharp #FSharp #UnitTest #TDD

2025-04-10

Quelques bonnes pratiques pour tester votre application Node.js.

🔗 github.com/goldbergyoni/nodejs

#nodejs #testing #unittest

2025-04-09

We have a prototype of the API documentation online: 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!

#DotNet #UnitTest #TDD

2025-04-05

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.

xunit.net/releases/v3/2.0.1
xunit.net/releases/analyzers/1

#DotNet #CSharp #FSharp #UnitTest #TDD

9Lukas5 🚂 🐧9Lukas5@mastodontech.de
2025-03-28

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 🙌🏼

#workleaks #MemoryLeak #Python #Java #Unittest

9Lukas5 🚂 🐧9Lukas5@mastodontech.de
2025-03-28

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.

#workleaks #MemoryLeak #Python #Java #Unittest

9Lukas5 🚂 🐧9Lukas5@mastodontech.de
2025-03-28

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. 👀

#workleaks #MemoryLeak #Python #Java #Unittest

2025-03-25

github.com/SwissLife-OSS/snaps - 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.

2025-03-18

jwtguard.net/ - #JWT Guard is a cool #dotNET #UnitTest suite to verify your #ASPnet app's #OAuth2 implementation is secure. I had fun poking at it and working with linkedin.com/in/wcabus/ to look at .NET User JWTs with it. Turns out I had misunderstood the purpose.

2025-03-18

Had an old #unitTest in a legacy project failing for some time already, but didn't recognize it/bother. Now I figured out the reason: the English name for #Turkey returned by the operating system is meanwhile #Türkiye, which doesn't match the old enum value Turkey anymore.
#coding #csharp

2025-03-17

Do you know a that allows you to mock a public method of the currently tested class in ?

I mean in ... I'm testing "method1" that calls "method2" (both are public), and then I must test both of them in the same unittest? It looks ugly. It may be nice to this "method2", even if it's part of the class under test. Right? 🤔

Gary "grim" Kramlichgrimmy
2025-03-13

Holy crap! I just noticed we're up to 130 unit test suites in @pidgin 3 now! Compare that to the 7 suites we have in Pidgin 2!

This is what we've been talking about when we've been saying that we're making the code easier to maintain. The code has been reworked so that we can actually unit test way more of it and we will continue to add more tests as we move forward!

2025-03-11

Simplified HTTP Response Mocking in Laravel Tests - Laravel News links.shikiryu.com/shaare/zV30
#laravel #test #unittest

2025-03-01

We just shipped core framework v3 2.0.0.

This contains breaking changes, so the release notes are rather more detailed than normal.

Release notes: xunit.net/releases/v3/2.0.0

#DotNet #CSharp #FSharp #UnitTest #TDD

2025-02-25

{testthat} is great for automatic testing. Here are some tricks for the heavy user: blog.r-hub.io/2020/11/18/testt #rstats #testing #unittest #testthat

Thiago Bomfimthiagobfim
2025-02-21

If you have many assertions, you can also use the SoftAssertions to test all the assertions and give all the results at once.

Read more 👉 lttr.ai/ATQTo

2025-02-16

More thoughts about test parallelism as it involves the starting/finished message pairs for test collections, test classes, and test methods.

If you're a runner author, do you use these messages? Can we just remove them?

Provide thoughts here: github.com/xunit/xunit/discuss

#DotNet #UnitTest

Brad Wilsonbradwilson
2025-02-14

A good first step.

These tests (and xunit.v3.assert.aot) are compiled with <PublishAot>true</PublishAot>, but still being run normally (not via a published executable). It's hard for me to know how many *more* tests might fail after publishing, but that's quite a ways off.

Test results include xunit.v3.assert.aot.tests (which has 1211 tests in net8.0) vs. the non-AOT version (which has 1417 tests in net8.0).
Brad Wilsonbradwilson
2025-02-12

Thinking about what an AOT version of @xunit would look like. I spent some time talking to @agocke last year about it so I have some thoughts.

It almost surely end up being a completely separate code base/package. No mixing and matching, because the internal design would be very different.

Top three things I think:

- .NET 8+ only (no .NET Framework)
- C# only (no F# or VB)
- No extensibility points (you get our Fact and Theory, you get our pipeline).

1/

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst