You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Stefan Seifert <ss...@pro-vision.de> on 2020/10/02 07:38:04 UTC

[roundtable] Code coverage

(Bertrand says) : Radu added a jacoco setup to the graphql-core last week that aggregates both unit and integration tests coverage, seems to work well. But I guess in some cases the pax exam tests run in a different process and need a specific setup? 

Unify support for collecting coverage in the Sling Parent Pom, so that all modules can benefit from the jacoco settings, making Sonarcloud reporting work by default for all projects. Radu volunteered to update the Parent Pom.


Re: [roundtable] Code coverage

Posted by Radu Cotescu <ra...@apache.org>.
Hi Konrad,

Sorry for getting back so late - I was off for two weeks.

> On 24 Oct 2020, at 17:09, Konrad Windszus <ko...@gmx.de> wrote:
> 
> Hi Radu,
> I am wondering why we need to still generate reports for both unit and integration test separately in https://github.com/apache/sling-parent/blob/3e7b3edb7411440b6a5dcd4836da2c45f4cc7166/sling-parent/pom.xml#L509 <https://github.com/apache/sling-parent/blob/3e7b3edb7411440b6a5dcd4836da2c45f4cc7166/sling-parent/pom.xml#L509>.
> IMHO just generating the report after merging the exec files should be enough.

We *don’t* need to generate reports for both, but it could be useful in some setups to see how a project’s code is covered. Feel free to change the configuration if it takes too much time on the projects you’re working on.

> WDYT?
> Konrad
> 

Cheers,
Radu

Re: [roundtable] Code coverage

Posted by Konrad Windszus <ko...@gmx.de>.
Hi Radu,
I am wondering why we need to still generate reports for both unit and integration test separately in https://github.com/apache/sling-parent/blob/3e7b3edb7411440b6a5dcd4836da2c45f4cc7166/sling-parent/pom.xml#L509 <https://github.com/apache/sling-parent/blob/3e7b3edb7411440b6a5dcd4836da2c45f4cc7166/sling-parent/pom.xml#L509>.
IMHO just generating the report after merging the exec files should be enough.
WDYT?
Konrad

> On 2. Oct 2020, at 11:09, Radu Cotescu <ra...@apache.org> wrote:
> 
> Hi,
> 
>> On 2 Oct 2020, at 09:38, Stefan Seifert <ss...@pro-vision.de> wrote:
>> 
>> (Bertrand says) : Radu added a jacoco setup to the graphql-core last week that aggregates both unit and integration tests coverage, seems to work well. But I guess in some cases the pax exam tests run in a different process and need a specific setup? 
>> 
>> Unify support for collecting coverage in the Sling Parent Pom, so that all modules can benefit from the jacoco settings, making Sonarcloud reporting work by default for all projects. Radu volunteered to update the Parent Pom.
>> 
> 
> Here I’ve sent a PR to the Sling Parent project which was merged [0]. Starting with version 40 of the parent pom, Sling modules can take advantage of the JaCoCo configurations, which are now properly collecting the coverage reports. For IT, you need to pass the value of the jacoco.command system property to your forked JVM.
> 
> Thanks,
> Radu
> 
> [0] - https://github.com/apache/sling-parent/pull/11


Re: [roundtable] Code coverage

Posted by Radu Cotescu <ra...@apache.org>.
Hi,

> On 2 Oct 2020, at 09:38, Stefan Seifert <ss...@pro-vision.de> wrote:
> 
> (Bertrand says) : Radu added a jacoco setup to the graphql-core last week that aggregates both unit and integration tests coverage, seems to work well. But I guess in some cases the pax exam tests run in a different process and need a specific setup? 
> 
> Unify support for collecting coverage in the Sling Parent Pom, so that all modules can benefit from the jacoco settings, making Sonarcloud reporting work by default for all projects. Radu volunteered to update the Parent Pom.
> 

Here I’ve sent a PR to the Sling Parent project which was merged [0]. Starting with version 40 of the parent pom, Sling modules can take advantage of the JaCoCo configurations, which are now properly collecting the coverage reports. For IT, you need to pass the value of the jacoco.command system property to your forked JVM.

Thanks,
Radu

[0] - https://github.com/apache/sling-parent/pull/11