问题描述
我有一个使用Rebar的Erlang应用程序,并且使用Common Test编写测试。我想看看这些测试的测试报道报告,所以我在我的 rebar.config
文件中包含以下行: {cover_enabled,true}。
但是,通用测试报告中的覆盖日志链接只会导致一个页面,封面工具不使用。
cover_enabled
设置 rebar.config
是必要的,但不足以激活通用测试的封面报告。您还需要在应用程序的根目录中创建名为 cover.spec
的文件,其中包含:
{incl_app,foo,details}。
(替换您的应用程序的名称 foo
。)
应该为您的申请提供封面报告。
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?
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.
这篇关于使用钢筋时,通用试验的封面报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!