What is code coverage and how do YOU measure it?

后端 未结 9 1867
长情又很酷
长情又很酷 2020-12-04 04:39

What is code coverage and how do YOU measure it?

I was asked this question regarding our automating testing code coverage. It seems to be that, outside of automated

9条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-04 05:09

    For Perl there's the excellent Devel::Cover module which I regularly use on my modules.

    If the build and installation is managed by Module::Build you can simply run ./Build testcover to get a nice HTML site that tells you the coverage per sub, line and condition, with nice colors making it easy to see which code path has not been covered.

提交回复
热议问题