Excluding plugins from Cobertura reports in Grails

时光总嘲笑我的痴心妄想 提交于 2019-12-08 07:26:42

问题


I'm using SpringSecurity plugin in my project and also Cobertura plugin for code coverage reports. The thing is I'd like the SpringSecurity specific classes (login and logout controllers, persistent login token and so on) to be excluded from my reports, since I assume they work properly. I'd like reports to contain only my project specific classes code coverage. Is there any way I can achieve that?


回答1:


coverage {

    exclusions = ['**/grails-app/conf/**','**/*any.other.package*','**/*any.class*']
    xml = true
    enabledByDefault = true
} 

Add the above snippet and configure the exclusions list in BuildConfig.groovy in grails-app/conf




回答2:


Please see Exclude code from code coverage with Cobertura

There is a similar post Excluding some classes from the cobertura report doesn't work, but it is still unresolved.



来源:https://stackoverflow.com/questions/5066873/excluding-plugins-from-cobertura-reports-in-grails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!