Grails/Cobertura 报告 - 条件覆盖没有意义 [英] Grails / Cobertura report - conditional coverage doesn't make sense

查看:17
本文介绍了Grails/Cobertura 报告 - 条件覆盖没有意义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么会导致这样的事情:

What could cause something like this:

def result 显示只覆盖了 2/6 个分支,即使它没有分支,而下面的行,实际上有一个条件,是可以的.

The line def result shows only 2/6 branches covered, even though it has NO BRANCHES, while the following line, which actually has a conditional, is ok.

这是怎么回事?我验证了 cobertura.ser 在构建之间得到清理.

What's going on? I verified that the cobertura.ser is getting cleaned up between builds.

推荐答案

知道在哪里可以获得该 JAR 的源代码吗?

jar用于 disableOptimizationsTransformation 的源代码

另外 - 知道如何仅在测试应用构建阶段将该 JAR 包含在类路径中吗?

// Remove the jar before the war is bundled
grails.war.resources = { stagingDir ->
  delete(file:"${stagingDir}/WEB-INF/lib/DisableOptimizationsTransformation-0.1-SNAPSHOT.jar")
}

来自 这里的其他帖子

这篇关于Grails/Cobertura 报告 - 条件覆盖没有意义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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