3 ms·
Log data is how unit testing started I think, people would log all the output and compare the sheet of actual log output to the sheet of expected log output. W
by joshribakoff 9y ago
Log data is how unit testing started I think, people would log all the output and compare the sheet of actual log output to the sheet of expected log output.
Working in an GUI debugger / REPL is great for visualizing code I often code that way myself, but let's not fool ourselves, it still requires manually setting breakpoints, and pressing keys to step through code. You can't do this for every method after every change, whereas unit testing has that advantage. I do agree with most things mentioned in the article though. A lot people end up writing tests that hit databases and are too slow or fail randomly due to chained state, or are over specified & end up just getting in the way. What it comes down to is you can have good tests or bad tests, and its still entirely subjective just like whether the code itself is good or bad. I recommend the book xUnit test patterns, its basically a bunch of "rules of thumb"