Unit test to only increase the coverage metric is an anti-pattern.
Example:
- testing data object
- testing getter and setter, ... if there is no logic in
Why it is an anti-pattern? Here my view.
- These coverage only unit test hide missing tests because they increasing the coverage metric but not increasing the code quality. No logic part is tested and it makes the coverage metric useless.
- If you have normal unit test then these tests covering all these simple things (getter, setter), if not then you ether missing real unit test or the code is not needed.
No comments:
Post a Comment