Quoting https://www.jacoco.org/jacoco/trunk/doc/faq.html

Why do I see classes in the coverage report although I excluded them in the 
JaCoCo agent configuration?

The includes and excludes options of the JaCoCo agent determine for which 
classes execution data is collected. Except for technical corner cases 
these options are normally not required. If you exclude classes, no 
execution data is collected for them.

Report creation is a separate step where all class files which should show 
up in the report are explicitly provided. Coverage is determined from the 
provided execution data. If execution data is missing for a particular 
class, this class is shown as not covered because the report generator 
cannot distinguish whether the class was excluded from instrumentation or 
not executed.

If you want to exclude classes from the report please configure the 
respective report generation tool accordingly.

On Wednesday, December 30, 2020 at 9:26:26 AM UTC+1 Kishore Mohanavelu 
wrote:

> Hi Guys,
>
> I would like to specify only a list of classes under a particular 
> package(eg: com.server) to be analysed by jacoco. I don't want other 
> classes under different package to be considered for code coverage. I am 
> specifying the package as below, but it is not working.
>
> *Option 1 - Tried:*
> -*java*agent:jacocoagent.jar=address=localhost,port=8084,includes=**/com/server/**,destfile=jacoco_output.exec,output=tcpserver
>  
> -cp . -jar ironhide.jar server config.yml &
>
> *Option- 2 - Tried:*
> -*java*agent:jacocoagent.jar=address=localhost,port=8084,includes=**.com.server.**,destfile=jacoco_output.exec,output=tcpserver
>  
> -cp . -jar ironhide.jar server config.yml &
>
> What is the format that I have to specify in the includes parameter? Can 
> someone help please? 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/bf6db05e-b81e-411b-8493-7e12a07749b4n%40googlegroups.com.

Reply via email to