Open ben-sagar opened 4 years ago
All new or changed code must have sufficient coverage and the overall total coverage must not decrease below 90%.
This seems sensible.
~Additionally, we can consider adding a generalised caveat, such as:~
~"While code quality is of great importance, there may be instances where test coverage metrics are unhelpful, or obstructive to making progress (delivering at pace
). In those instance, teams are encouraged to think pragmatically and to work together (with the guidance of the principal developers) to find suitable benchmarks."~
I'm ok with the new wording. I am wary though of including reasons within the standards at this time that discuss scenarios when not meeting the standard is ok.
Yes, I do engage in just such pragmatism within my own teams. However, having been dropped into yet another project where low to non-existent test coverage is the norm the behaviour I want to drive is that unit tests are not optional.
If you are high performing team actively discussing how to improve the quality of your tests I don't think you have anything to worry about from a standards point of view. Until we are all there though my preference would be that the standards are pretty unequivocal.
In the section on unit test coverage in the common coding standards it says:
The use of the phrase "must not decrease" causes the following effects:
It would be better if this could say something like: