Grails / Cobertura报告 - 有条件的报道没有意义 [英] Grails / Cobertura report - conditional coverage doesn't make sense
问题描述
可能会导致这样的情况:
行 def result
只显示2/6分支,即使它没有分支,而实际上有条件的下面一行是可以的。
发生了什么事?我验证了 cobertura.ser
在构建之间正在清理。
< 任何想法,我可以得到该JAR的来源?
jar 和 souce代码 for disableOptimizationsTransformation
另外 - 任何想法如何将该JAR包含在classpath中,仅用于测试应用程序构建阶段?
//在战争捆绑之前移除jar
grails.war.resources = {stagingDir - >
delete(file:$ {stagingDir} /WEB-INF/lib/DisableOptimizationsTransformation-0.1-SNAPSHOT.jar)
}
from 其他帖子在这里
What could cause something like this:
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.
What's going on? I verified that the cobertura.ser
is getting cleaned up between builds.
any idea where I can get the source for that JAR?
jar and souce code for disableOptimizationsTransformation
Also - any idea how to include that JAR on classpath ONLY for the test-app build phase?
// Remove the jar before the war is bundled
grails.war.resources = { stagingDir ->
delete(file:"${stagingDir}/WEB-INF/lib/DisableOptimizationsTransformation-0.1-SNAPSHOT.jar")
}
from other post here
这篇关于Grails / Cobertura报告 - 有条件的报道没有意义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!