Timeline for What is the point of unit tests?
Current License: CC BY-SA 4.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 20, 2023 at 11:14 | audit | First answers | |||
| Jun 20, 2023 at 11:14 | |||||
| Jun 18, 2023 at 23:18 | history | edited | Flater | CC BY-SA 4.0 | added 21 characters in body |
| Jun 18, 2023 at 23:17 | comment | added | Flater | @MarkRotteveel: You're right, it not "the only way" in such a strict sense (I should rephrase that). I should've called it "a significantly more reliable way". | |
| Jun 18, 2023 at 23:16 | comment | added | Flater | @Mr.Budris: I agree that tests can significantly help the onboarding process, but I do feel that "simple interfaces, complex implementation" contributes more to the ease of onboarding than tests do. This claim is based on having worked both in well-tested but complex-interface codebases and rather untested but cleanly designed codebases. | |
| Jun 16, 2023 at 19:18 | comment | added | Mr.Budris | A well-tested code base is much easier to onboard to as a new developer, as well, IMO -- I know when I'm breaking things, I know what the intention of components are, and I can get up-to-speed more rapidly | |
| Jun 16, 2023 at 8:26 | comment | added | Mark Rotteveel | "The only way to catch misinformed decisions is by having the test cases designed by a different person than who designed the implementation." I think that depends. I have had enough cases where writing the test (whether before or after writing the main code) lead me to new ideas, informed me of my misconceptions, and led me to rethink or rewrite things. This does require thinking during writing the tests, and not just blindly writing a test that verifies the code does what it does, but that the code does what it is intended to do (and thus, also make you check if you understand the what). | |
| Jun 15, 2023 at 10:03 | comment | added | Jan 'splite' K. | The necessity of tests is only visible when you are suffering the consequences of not having any. This. Sooo much this. | |
| Jun 14, 2023 at 12:46 | comment | added | Paul D. Waite | Although it's focused on Node.js, I found this guide/manifesto/whatever helpful when trying to figure out how to write tests that don't become a useless maintenance burden: github.com/goldbergyoni/… | |
| Jun 14, 2023 at 7:19 | comment | added | Passer By | "the components themselves contain the complexity, and the contracts [...] are as simple [...] as possible." has got to be the best explanation of what good API means. I'm quoting this whenever I need to whack someone over the head with their crappy APIs. Figuratively, of course, those APIs are too brittle to hurt. | |
| Jun 14, 2023 at 1:11 | comment | added | Greg Burghardt | "Tests flag issues when they occur ... therefore, the existence of tests completely hides the problematic consequence from not having tests." — @Edwardo, read and re-read that paragraph until it is etched into your soul. I think that paragraph alone addresses most of your question. The value of unit tests is so hard to quantify because it means comparing your present situation to the road not traveled. | |
| Jun 13, 2023 at 23:44 | history | answered | Flater | CC BY-SA 4.0 |