Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
atheist99913yExcellent talk: https://youtu.be/tWn8RA_DEic
Interesting discussion: https://devrant.com/rants/4751612/... -
> "'I'm about to argue that testing patterns are even further behind"
Wanna start a fight?
Tell a TDD'er that not all code needs to be testable.
Then, to send em' into a murderous rage, tell them that integration tests are more important than unit tests. -
@PaperTrail I'll fight! I would assume if a TDD'er wants "all code to be testable", that means they should hit 100% code coverage with their tests.
Show me a project with 100% code coverage :) -
"If I'm looking at my code and I cannot unit test it... then I have a question about my architecture: should this be unit-testable, and have I added some artificial complexity or coupling that we shouldn't have?"
Brilliant. -
@fullstackchris > "Show me a project with 100% code coverage"
We had a team that pushed 100% code coverage and they had tests for *everything*, even models/DTOs/POCOs to achieve that 100%.
myObject.Value = 3;
Assert(MyObject.Value == 3);
I refused to get any of my code to some arbitrary percent and 'called to the office' a time or two. That is another story (not enough space here) -
Quantity vs Quality vs Maintenance Cost.
Quantity - 100 % usually means tests are added without any necessity, as you _cannot_ test everything and 100 % is based on LoC which is nonsense... For various reasons.
Quality - testing relevant stuff in an appropriate way. :) E.g. starting a database server process to test SELECT 1+1; is very inappropriate.
Maintenance costs - keep it neat and clean. If the tests consume cost more resources than a devs salary something is fishy.
If someone thinks I'm joking, nope. Jolly dead serious.
I understand what @Kiki meant in his discussion and I really think that testing shouldn't check the obvious, rather the obnoxious. -
@IntrusionCM > "I really think that testing shouldn't check the obvious, rather the obnoxious."
YES!!!
Related Rants
I read: "Don't change your implementation to do tests"
Then I read: "If it's too hard to test, your implementation is too complex"
Then we can get into test terminology itself, which is its own mess:
http://xunitpatterns.com/Mocks,%20F...
sheesh, if you thought the whole javascript / framework / web ecosystem always feels immature and behind other areas of software, i'm about to argue that testing patterns are even further behind
rant
standards
testing
where?
tests