3 ms·
You could have watch the program and observed the failure, why need to write a test to be “surprised” it failed
by m3kw9 3y ago
You could have watch the program and observed the failure, why need to write a test to be “surprised” it failed
- corndoge 3y agoThe program worked! As I wrote, the test tried a rare error condition and the handling for that was faulty. Updated the original to clarify. Hope that helps!
- therealdrag0 3y agoA huge benefit of tests is their regression protection against future changes, often by other engineers. You don’t get that from ad hoc manual execution.
- nerdponx 3y agoThis. I like tests because it's hard to know if I accidentally broke something other than the thing I'm working on. Even software of modest size is at a level of complexity beyond what a human can QA in a reasonable amount of time for every revision. If you're at the point of needing a checklist with even 3 items on it, you're past the point of needing tests.
- pfdietz 3y agoCPU cycles are so cheap these days that this is a gross waste of manpower. Even better than manually written unit tests are automatically generated property-based tests (which can be unit or integration tests). One can literally run millions of tests in a day this way, far, FAR more than could ever be manually verified. All because computation is so darned cheap now.