On 30 Aug 2019, at 10:07, Jeff Scott Brown wrote:
> On 30 Aug 2019, at 2:00, Jessie Evangelista wrote:
>
>> Hi all,
>>
>> We are considering using grails 4.0.0 for a new product and we'd like
>> to do
>> it the right way from the start.
>>
>> It seems there are no plugins yet for code coverage in the grails3
>> list:
>>
http://plugins.grails.org/?query=coverage&submit=Search
>>
>> The plugins for grails 1 and 2 also dont work:
>> OpenClover Code Coverage for Grails
>> Test Code Coverage Plugins
>>
>> What is the best way to implement code coverage measurement for a
>> grails4
>> web application?
>>
>
> JaCoCo is quite popular.
>
>
https://docs.gradle.org/current/userguide/jacoco_plugin.html
>
>
>
FYI… I had not used it with Grails 4 yet but just created a simple app
to see if it appears to work and it does.
I just created a new app and added the following to build.gradle:
plugins {
id 'jacoco'
}
jacocoTestReport {
executionData test, integrationTest
}
That seems to generate the expected reports.