r/learnjava • u/msdkflskdf • Aug 23 '16
What kind of tests should I write as a software developer?
https://pawelniewiadomski.com/2016/08/22/what-kind-of-tests-to-write-when-developing-software/?utm_source=reddit&utm_medium=referral&utm_campaign=what-tests-to-write&utm_content=learnjava-2016-08-23
0
Upvotes
4
2
u/nutrecht Aug 24 '16
The article of James O Coplien you link to and copied the best practices from is controversial at best and just plain idiocy in many places. Just a single example (the worst offender):
This is completely moronic. Tests are there not to show your software works now but also to safeguard it from regressions in the future.
Having a good testing strategy is important. You don't want to put too much effort in software that's likely to be thrown away in a few months. You also don't want to test everything multiple times because when you refactor software you also need to refactor tests.
But this article helps no one. Grand statements like "TDD is dead" or "you can test X with either a system test or a unit test, use a system test" might look nice in your post but don't offer any substance and are plain wrong in many contexts.
Also please keep in mind that this is a sub for beginners. Taking what you said there as gospel is likely going to do them more harm than good.