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
-
Same guy in implementation: "why the hell didn't this get caught? There should have been more testing."
-
Unit tests are a waste of time on small teams and on most everyday projects.
Most projects dont have consistent specs, so everytime the pm/boss/client comes up with something new you have to rewrite the app and the unit tests. -
Buggz6217yThe only real use I've gotten out of unit tests is verifying algorithms. I once wrote a search engine which did some analysis on the input first. I wrote tests for over 20 use cases of this analysis and wrote code until they all passed.
For everything else I write functional tests, or end-to-end tests as some people call it, using selenium or calling an api endpoint with a proper request. -
@sSam yeah exactly, thats the root of the problem. 99% of unit tests could and should be generated, yet we have no such program yet.
-
@sSam its not that hard to reflect on methods and try them with, say, "", " asd", null, if they take a string.
-
sSam15017y@sharktits yeah, but how is the generator supposed to know what should be the output of the method or what is it supposed to do?
-
@sSam i mean, null checks and exceptions checks, but it shouldnt be too hard to check output either
-
sSam15017y@sharktits and how it would know what kind of exception when should occur? Maybe nulls are valid arguments for that method, maybe they're not, how would generator know?
-
Something to think about, if you happen to disregard unit/integration tests
http://blog.codepipes.com/testing/... -
Brolls31557yUnit tests are a waste of time (sometimes).
I’ve seen (and been the perpetrator of) both extremes.
I like living here in the middle now.
Enough coverage that I know if I’ve done something silly.
Not so much that if I decide to fix something silly I don’t have to budget a Millenia to redo the tests. -
ammadfa1467yYes i don't particularly enjoy writing unit tests either! Instead i started working on building someting that will automatically do sanity check validation on the most common models. Once completed it should just just work for 80% of the backend functionally.
Related Rants
"Unit tests are a waste of time, and we should avoid doing that if possible. "
Kill me please.
rant
i can't even
why me
dead inside