Song Cover Image

Over and Over -DnDGen.Stress Theme-

V6-MINI

[Intro - a lone anvil rings, then the whole band stomps in] (Hey! Hey! Hey! Hey!) Over and over! (Over and over!) [Verse 1 - tight and rhythmic, like a work song] Random generators are hard to test A bug might only show up once Once in a few thousand runs And then it's gone again So the Stressor runs the test Over and over and over again Built for NUnit, forged for the generators Of DnDGen [Pre-Chorus] Until the time limit expires (Expires!) Or enough iterations have completed To be confident in the result (Confident!) [Chorus - huge gang vocals, call and response] Over and over! (Over and over!) Strike it again! (Strike it again!) Any failure on any iteration Fails the test! (Fails the test!) With the original stack trace preserved Over and over, again and again! [Verse 2] Add DnDGen.Stress to your tests Version five needs .NET ten and NUnit five Use version four if you're still on .NET eight Create a Stressor once per test fixture Then call it from your tests Call on the Stressor, and the hammer falls Assert the name is never empty (Never empty!) [Pre-Chorus] Setup before and teardown after Every iteration, every one And the teardown runs Even if the test throws! (Even if it throws!) [Chorus - huge gang vocals, call and response] Over and over! (Over and over!) Strike it again! (Strike it again!) Any failure on any iteration Fails the test! (Fails the test!) With the original stack trace preserved Over and over, again and again! [Verse 3 - faster, galloping] Async, batch after batch A batch of tests at a time As many as the processor count Running side by side Generate until the result is valid Or fail if the time runs out first A rare result can be generated And we'll prove it, or we'll fail! [Breakdown - anvil and choir alone, slow and heavy] Without full stress One second for every test (One second!) With full stress One hour for the build Divided evenly among them Ten minutes at most for a single test So the build never sits in silence Build it in the Stress configuration! (Full stress!) [Verse 4 - building back up] Count the active tests in the running assembly Or set the count yourself Set exactly one of them, never both Scale the time to leave some headroom Greater than zero, and at most one Whichever limit is smaller (That is the time limit!) [Final Chorus - key change up, full band and choir at full power] Over and over! (Over and over!) Strike it again! (Strike it again!) Any failure on any iteration Fails the test! (Fails the test!) A million iterations And we're confident it holds! Over and over, again and again! [Outro - the band drops out, the choir chants over the anvil] Duration! Iterations! Iterations per second! And the likely status... Logged to the console by default Or to a logger of your own (Over and over...) [A last anvil strike rings out]