[ 
https://issues.apache.org/jira/browse/LUCENE-9188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17338040#comment-17338040
 ] 

Uwe Schindler commented on LUCENE-9188:
---------------------------------------

To run coverage, now the following needs to be done for developers:
 * check out source
 * execute {{gradlew coverage}}; usual test parameters can be added, like test 
filtering
 * open the report (per module) reported by gradle's log output

On Jenkins we have a new job, which runs tests and generates a *combined 
"overall"* report (all modules in one HTML layout): 
https://ci-builds.apache.org/job/Lucene/job/Lucene-Coverage-main/

Internals: To run tests with instrumentation, you can also add a system 
property: {{-Dtests.coverage=true}} to usual test runs (e.g. on Jenkins). This 
will write JaCoCo database files to the test CWD. It won't generate any report, 
this is up to you (run Gradle task separately or use your IDE / Jenkins to 
produce the rport, e.g. by meging all per-module database files into one 
report).

For easy usage, the "per-module" task {{gradlew coverage}} was added.

> Add jacoco code coverage support to gradle build
> ------------------------------------------------
>
>                 Key: LUCENE-9188
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9188
>             Project: Lucene - Core
>          Issue Type: Task
>          Components: general/build
>            Reporter: Robert Muir
>            Assignee: Uwe Schindler
>            Priority: Major
>             Fix For: main (9.0)
>
>         Attachments: LUCENE-9188.patch, report.png, screenshot-1.png
>
>          Time Spent: 7h 10m
>  Remaining Estimate: 0h
>
> Seems to be missing. I looked into it a little, all the documented ways of 
> using the jacoco plugin seem to involve black magic if you are using "java" 
> plugin, but we are using "javaLibrary", so I wasn't able to hold it right.
> This one should work very well, it has low overhead and should work fine 
> running tests in parallel (since it supports merging of coverage data files: 
> that's how it works in the ant build)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to