Hi, JaCoCo creates a report for all class files you provide to the report generator. JaCoCo has no idea which classes belong to your web service.
Probably the best approach would be to have another JAR from your build which only contains the classes from the web service without 3rd party dependencies. If you cannot retrieve this from your build you could unzip the all-in JAR and extract the class files you are interested in. Regards, -marc > On 24. Nov 2020, at 17:00, Kishore Mohanavelu <kishoremohanavel...@gmail.com> > wrote: > > I have a jacoco agent that is attached to a webservice. I executed my > automation test cases and extracted the jacoco-client.exec from the > webservice using the ExecutionDataClient. Now I am trying to generate a > jacoco report for the webservice using the jacoco-client.exec file. > > I am using the below command to generate the report. > java -jar jacococli.jar report jacoco-client.exec --classfiles > rest-service2-0.0.1-SNAPSHOT.jar --html report > > The webservice code repo is present as a separate repo and it is not a part > of the automation code repo. So I cannot provide the classfiles path directly > in the above command. So instead i am providing the application jar. > > The issue is, jacoco is generating the code coverage report for all the maven > dependencies in the jar along with the original code. But I need the code > coverage for the application code alone and not the dependencies code. I am > entirely new to using jacoco and don't know how to proceed further. Can > someone please help me with this 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 jacoco+unsubscr...@googlegroups.com > <mailto:jacoco+unsubscr...@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jacoco/a5b38573-b603-409d-a090-4731bed6e35an%40googlegroups.com > > <https://groups.google.com/d/msgid/jacoco/a5b38573-b603-409d-a090-4731bed6e35an%40googlegroups.com?utm_medium=email&utm_source=footer>. > <Screenshot 2020-11-24 at 8.29.20 PM.png> -- 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 jacoco+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/D11E1D5E-82E6-4669-A7E3-D1672DE3FD70%40mountainminds.com.