Nilesh Pawar
Jun 18, 2022

Agreed. I have seen developers write such bogus tests simply to meet the numbers inlcuding writing tests for the trivial getters\setters! Mis-using the mocks can addtionally lead to tests which don't test the original functionality at all. (Similar to what you have mentioned below), I had caught tests from some teams miussing mocks where all the tests were passing even when the original function was doing a blind: return null; !!!

Nilesh Pawar
Nilesh Pawar

Written by Nilesh Pawar

20+ years writing software. Forever Math \ Physics enthusiast.

Responses (1)