What can be alternative metrics to code coverage?

后端 未结 15 733
迷失自我
迷失自我 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:24

    This hasn't been mentioned, but the amount of change in a given file of code or method (by looking at version control history) is interesting particularly when you're building up a test suite for poorly tested code. Focus your testing on the parts of the code you change a lot. Leave the ones you don't for later.

    Watch out for a reversal of cause and effect. You might avoid changing untested code and you might tend to change tested code more.

提交回复
热议问题