Unit testing code coverage - do you have 100% coverage?

后端 未结 17 2751
离开以前
离开以前 2020-12-13 09:05

Do your unit tests constitute 100% code coverage? Yes or no, and why or why not.

17条回答
  •  别那么骄傲
    2020-12-13 09:24

    From Ted Neward blog.

    By this point in time, most developers have at least heard of, if not considered adoption of, the Masochistic Testing meme. Fellow NFJS'ers Stuart Halloway and Justin Gehtland have founded a consultancy firm, Relevance, that sets a high bar as a corporate cultural standard: 100% test coverage of their code.

    Neal Ford has reported that ThoughtWorks makes similar statements, though it's my understanding that clients sometimes put accidental obstacles in their way of achieving said goal. It's ambitious, but as the ancient American Indian proverb is said to state,

    If you aim your arrow at the sun, it will fly higher and farther than if you aim it at the ground.

提交回复
热议问题