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

后端 未结 17 2755
离开以前
离开以前 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:07

    It is seldom practical to get 100% code coverage in a non-trivial system. Most developers who write unit tests shoot for the mid to high 90's.

    An automated testing tool like Pex can help increase code coverage. It works by searching for hard-to-find edge cases.

提交回复
热议问题