使用钢筋时,通用试验的封面报告 [英] Cover report from Common Test when using rebar

查看:137
本文介绍了使用钢筋时,通用试验的封面报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用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.

这篇关于使用钢筋时,通用试验的封面报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆