What can be alternative metrics to code coverage?

后端 未结 15 735
迷失自我
迷失自我 2021-01-30 10:00

Code coverage is propably the most controversial code metric. Some say, you have to reach 80% code coverage, other say, it\'s superficial and does not say anything about your te

15条回答
  •  花落未央
    2021-01-30 10:20

    I wrote a blog post about why High Test Coverage Ratio is a Good Thing Anyway.

    I agree that: when a portion of code is executed by tests, it doesn’t mean that the validity of the results produced by this portion of code is verified by tests.

    But still, if you are heavily using contracts to check states validity during tests execution, high test coverage will mean a lot of verification anyway.

提交回复
热议问题