To be fair, I’ve yet had a job that actually pulls off unit testing. Most either don’t bother or just go for the grunt work bare minimum to force pass tests. Most friends in my field have had pretty much the same experience. Unit tests can be just a chore with little to no real benefit. Maybe an opensource project that actually cares about its code can pull it off, but I wouldn’t bat an eye if they never get to it.
Comment on [deleted]
rglullis@communick.news 10 months ago
There is also a lesson in implementing proper tests. During these holidays I started to play a bit more with Rust and went on to look at Lemmy’s backend code. Not a single unit test in sight…
JGrffn@lemmy.world 10 months ago
rglullis@communick.news 10 months ago
If you go through the comments, you will see that the devs talk about an issue with the logic in the for loop, which “may be stopping before it should”. Writing a couple of test cases that check whether this is true or not should be trivial.
I’d expect at the very least some type of regression tests to be implemented for every bug that makes into production, to avoid cases like this one where the developers spend weeks figuring out whether their patches even fix the bug in the first place.
ShunkW@lemmy.world 10 months ago
I’m surprised that’s your experience. I’ve worked 4 software engineering jobs now, and every single project has had well done unit test suites.
Valmond@lemmy.mindoki.com 10 months ago
What kind of job do you have, making websites?
JGrffn@lemmy.world 10 months ago
Usually a React dev, have been some other stuff, but generally yeah, websites. Anything from resort chain websites to complex internal applications. Unit tests were optional at best in most jobs I’ve been at. I’ve heard of jobs where they’re pulled off, but from what I’ve seen, those are the exception and not the rule.
Valmond@lemmy.mindoki.com 10 months ago
That explains why you haven’t seen many unit tests then.
I guess you haven’t really worked on complex software just yet too, like a 2GB sourscode 700 projects all in one where tests saves the day all the time.
So maybe you’re the lucky one :-D
Cheers
Bishma@discuss.tchncs.de 10 months ago
Same. Every team talks a good game about unit testing but in nearly 20 years I’ve yet to see a single worthwhile test in a company’s code base.
Spuddlesv2@lemmy.ca 10 months ago
We all await your commit containing all those simple unit tests with bated breath.
rglullis@communick.news 10 months ago
I want to work an issue that is open since 2020, but I can only justify dropping all my other work for that if I have enough paying customers interested in some new feature. So, help me get 50 customers to my “all in one” hosting service and I will start dedicate a week to it, which should be more than enough time for even a Rust newbie like me to submit a proper PR to that issue. Ok?
Valmond@lemmy.mindoki.com 10 months ago
Yeah and plz send 2000€ and I’ll work on it too.