News for hackers. Stuff that matters.
Re:Most Unit Testing Is Waste (2014) [pdf] by jondubois on Saturday October 08, 2016 @05:48PM (#12668884)
Good point.

I hate it when people write tests to cover every single function (to cover every line of code) but they pay almost no attention to the range of inputs/arguments passed to those functions.

I think that most bugs in production can be traced back to "An unexpected argument which was passed to a complicated function/method" - According to this, you should focus your testing efforts on methods/functions that have complicated logic and you should test them with a range of unusual arguments/inputs.

Writing tests for EVERY function/method using only obvious (common use-case) arguments is a waste of time.

There are no comments on this comment yet.