I'm adding cobertura code coverage for my grails 3.1.6 project, the coverage report seems to be bit off, i.e I have unit test cases ( both pos & neg case) to cover a if block, but the report says no coverage for that if -block. Gradle: 2.13 Groovy: 2.4.5 grails: 3.1.6 cobertura gradle plugin: net.saliman:gradle-cobertura-plugin:2.3.2
Here is my code
if (params == null || params.isEmpty()) {
return []
}
My unit test pass empty params and null for params
coverage report say
'Conditional coverage: 0% 0/6 [each condition: 0%, 0%, 0% ]'
any idea what I'm doing wrong ?
Thanks in advance