|
I agree, but it's being forced on me
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Absolutely not, if properly done.
|
|
|
|
|
So, for end-to-end testing and feature testing, you know it will make refactoring easier and will protect against regression.
But what does a unit test do?
I see no immediate benefit, other than bragging rights for high code coverage.
What do you think, honestly?
|
|
|
|
|
It allows you to have a framework to test individual components (down to method level) to ensure that they work as intended.
And that means when you make a change later, you can run the same tests again and pick up any inadvertent changes you may have made.
I used to do this manually: I created tester projects which allowed me to check the "black box" functionality of my class, controls, and so forth so when I used them in real projects I had a high degree of certainty that they worked, and to test my later fixes to make sure I didn't introduce a bug.
I started doing this after a colleague fixed "bug A" for a client, who later found "bug B". She fixed that, and the client found "bug A" was back. Fixed ... hello "bug B"! After about 6 loops of this the client was not impressed at all ... formalized testing would have meant that the tests for both bugs would (or at least should) have been done prior to release, and the customer shouldn't have seen a problem.
Units tests formalize that, make it a lot easier to regulate, monitor, and perform.
Honestly, if you care about code quality I'd recommend you give them a try. Properly done, they can save a lot of grief.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Lines in the sand that multiple people can agree on, and that can be easily checked and evaluated.
I can see the value in that.
Thanks for the comment.
|
|
|
|
|
|
|
"The Art of Unit Testing" by Roy Osherove.
Easy to read, covers the subject comprehensively. I believe the Second Edition covers up to date mocking frameworks.
|
|
|
|
|
This gentleman with great C#/.NET video tips https://www.youtube.com/c/Elfocrash/videos[^] released recently Unit Test training. Check his videos and if you like his teaching, you should find a link to his website with his online trainings.
|
|
|
|
|
|
Please be careful when inserting links: you distorted this one so badly it looked like "hidden link" spam to the automated system. I let it through and have corrected it, but please try to make sure it doesn't happen again as some of our members are rather more "trigger happy" than I am!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
Winnie-the-Pooh: Blood and Honey - IMDb[^]
But ... you might want to think twice before you get it for the kids ...
You see, Pooh is out of copyright, so ... it's a slasher film ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
May I please inquire why a link to a Winnie the Pooh slasher film is not a "ton of click-bait" and not "pretty darn close to spam"? - Cheerios
|
|
|
|
|
Certainly looks more like Piglet than Hamlet!
If you can't laugh at yourself - ask me and I will do it for you.
|
|
|
|
|
If it's a slasher film, I expect piglet will soon be a cutlet.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
modified 2-Sep-22 6:28am.
|
|
|
|
|
Next - Beatrix Potter's stories?
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Years ago, I bought a piece of art from a Comicon event in Miami...
It was Winnie the Pooh...
A Noose around his neck, standing on eyore's back...
I bought it because it was creatively done, and eerily dark humored.
it bothered my wife so much, she packed it away with old photos. LOL.
UNSETTLING was the best description...
|
|
|
|
|
Watched the trailer...so...the only thing this thing's got in common with Winnie the Pooh is the fact that the bad guy's wearing a Winnie the Pooh mask...?
|
|
|
|
|
Can one of you lot post the answer as I'm going out soon I know at least two of you know the answer.
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
I may or may not know the answer, but I can't do tomorrow so can't risk to get it right
“Real stupidity beats artificial intelligence every time.”
― Terry Pratchett, Hogfather
|
|
|
|
|
Sorry - I was out (Herself had to be taken shoe shopping, always a traumatic excursion).
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
My second daughter (almost 15) started the school a bit differently... She put aside her smartphone (a fairly new Samsung A52) and picked a Nokia 215 we had in the drawer...
“Real stupidity beats artificial intelligence every time.”
― Terry Pratchett, Hogfather
|
|
|
|
|
I am not sure what to do with this piece of information - Is there a hidden pun and have I been living under a rock, or is she smart indeed ?
|
|
|
|
|
She is smart - but that's not the point...
How many teenagers do you know who willingly gives up on smartphone? In my experience she is the very first...
“Real stupidity beats artificial intelligence every time.”
― Terry Pratchett, Hogfather
|
|
|
|