News for hackers. Stuff that matters.
Re:Don’t mock what you don’t own by treeman79 on Wednesday June 22, 2022 @12:45PM (#31838419)
Few years ago I inherited a large code base. Tens of thousands of tests. Company was very proud.

Basically all the test did was prove that the mocking library worked well. Almost no actual project code or business logic was tested.

Company was not happy to hear.

Re:Don’t mock what you don’t own by kinetronic on Wednesday June 22, 2022 @04:24PM (#31841428)
James Coplien wrote in 2014 I think a paper titled "Why most unit testing is waste" which stirred up a storm among developers. I've seen many rebuttals, and they keep cropping up every year, but most seem to agree with his core premise: unit testing is valuable for testing algorithms -- stateless functions performing a computation -- and not much else.
Re:Don’t mock what you don’t own by hynek on Wednesday June 22, 2022 @01:03PM (#31838692)