Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
I love it!
Next question is, are people mad at you for 'breaking' their tests?
Gnonpi8662yI though unit tests were supposed to test data whose output you know, I'm having a hard time seeing why including a Randomness thing? Can someone explain it in under 1000 characters?
crisz81092yAnyways a test function shouldn't use random values. Tests have to be predictable, you mustn't use that function at all
Pointer35962yYou could say that...
(•_•) / ( •_•)>⌐■-■ / (⌐■_■)
You unveiled the illusion
@crisz Exactly. Had a recent situation where my code changes rightfully broke several integration tests for another team. The area manager came unhinged instead of "Great! The integration tests did their job!"
After a cooling off period and I modified the tests for his team, all was good.
I don't know why, but some individuals think unit tests is a golden idol that is never supposed to change or heaven forbid, break.
@PaperTrail Hah! The other day I was writing some unit tests that were overly verbose, but there was some a small piece of functionality I wanted to verify before moving forward, so I wrote a few unit tests for it anyway.
A couple days later they broke, like I knew they would, because I changed things.
SO I JUST FUCKING DELETED THEM FJDJSKCKDKSKS OH GOD THE HORROR I'M A MONSTER
Your Job Suck?
Take a quick quiz from Triplebyte to skip the job search hassles and jump to final interviews at hot tech firms
Get a Better Job