Zero coverage with IntelliJ IDEA: Grails with Spock unit tests -
i trying configure code coverage reporting our grails application when running spock-based unit tests. able generate reports, coverage 0.
i have tried playing various options (e.g. sampling vs. tracing), results same: total number of classes/methods/lines shown correct, coverage 0, e.g.:
class,%: 0%(0/2)
method,%: 0%(0/4)
line,%: 0%(0/16)
which bogus, since relevant code can modified in such way tests fail.
the setup:
- os x yosemite 10.10.2
- intellij idea ultimate 14.1.3
- grails 2.4.4
- spock 0.7
- groovy 2.4.3
- java 1.8.0-31
i wrote jetbrains support , pointed me following issue:
https://youtrack.jetbrains.com/issue/idea-137285
in short, resolution specify
grails.project.fork = [ test: false ]
in buildconfig.groovy .
also, see intellij idea debugger isn't working on grails project - there useful info there on when/how/why use fork mode.
Comments
Post a Comment