Test Coverage On CI

I’m a fan of if not TDD, TWD, testing while developing. I believe that having decoupled code that can be easily tested and debugged at the method level keeps code healthy, readable and robust. This naturally leads to a certain level of test coverage. In my current role I deal with a lot of untested code as not everyone agrees with my TDD or TWD approach. I believe firmly that some form of test coverage helps to increase quality so I wish to enact a policy on our CI builds that causes a build failure if there is not a certain minimal level of test coverage. This would be easy for me, but hard for some who do not write tests. My perspective is they can be integration or functional tests, but we need some level of test coverage for code to be considered complete. It’s much easier to achieve some test coverage unit testing of course.

Is this as reasonable approach to take? I believe so as I believe we can catch bugs much earlier and eliminate many from ever existing if we push more test coverage, but is it reasonable to ask those who don’t agree to comply via breaking the CI build if they do not?