Cover report from Common Test when using rebar

懵懂的女人 提交于 2019-12-11 03:28:31

问题


I have an Erlang application that uses Rebar, and has tests written using Common Test. I'd like to see the test coverage report for these tests, so I included the following line in my rebar.config file:

{cover_enabled, true}.

However, the "Coverage log" link in the Common Test report just leads to a page that says "Cover tool is not used". How can I get it to use the cover tool and give me a cover report when running the tests?


回答1:


The cover_enabled setting in rebar.config is necessary but not sufficient to activate cover reports for Common Test. You also need to create a file called cover.spec in the root directory of your application, containing:

{incl_app, foo, details}.

(Substitute the name of your application for foo.)

That should give you a cover report for your application.



来源:https://stackoverflow.com/questions/28969405/cover-report-from-common-test-when-using-rebar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!