【问题标题】:Cover report from Common Test when using rebar使用钢筋时来自 Common Test 的覆盖报告
【发布时间】:2015-05-12 05:26:13
【问题描述】:

我有一个使用 Rebar 的 Erlang 应用程序,并且有使用 Common Test 编写的测试。我想查看这些测试的测试覆盖率报告,因此我在rebar.config 文件中包含以下行:

{cover_enabled, true}.

但是,Common Test 报告中的“Coverage log”链接只会指向一个显示“Cover tool is not used”的页面。如何让它使用封面工具并在运行测试时给我一份封面报告?

【问题讨论】:

    标签: erlang rebar test-coverage common-test


    【解决方案1】:

    rebar.config 中的cover_enabled 设置对于激活 Common Test 的封面报告是必要的,但还不够。您还需要在应用程序的根目录中创建一个名为 cover.spec 的文件,其中包含:

    {incl_app, foo, details}.
    

    (用您的应用程序名称替换foo。)

    这应该会给你一份申请的封面报告。

    【讨论】:

      猜你喜欢
      • 2012-11-16
      • 2017-08-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-05
      • 2019-10-23
      • 1970-01-01
      • 2011-07-27
      相关资源
      最近更新 更多