Difference between Execution Data vistor dump and the jacoco cli report generated report

55 views
Skip to first unread message

ari

unread,
May 22, 2018, 3:27:24 AM5/22/18
to JaCoCo and EclEmma Users
Hi,
I want to understand the difference between the code cov hit  by above two methods.
I have used execution data visitor api and collected the no. of hits probes of each test coverage from the dump generated.
Using the same dump , I generated the  coverage report of the test .
both of them differ, meaning in the second method, I see almost correct no. of classes touched.
But via the execution data visitor, look slike there ar emor ehits on the class files.
Why is there a difference  and to get the accuracy by method 1 , what i should do?
HIts/probes via the First approach:(sample)
------------------------------------------
Case 1:

2409278275e55449    1 of  15   oracle/apps/crm/service/svcMgmt/srMgmt/srMgmtService/view/SrCategoryVOImpl
1a6480ee4ddd8d8a    3 of  29   oracle/apps/crm/service/svcMgmt/emailService/applicationModule/server/InboundMessagesServiceImpl_8xi19b_Impl
5a75245bdf47c1d7    3 of  58   oracle/apps/crm/service/svcMgmt/model/channel/view/ChannelVORowImpl$AttributesEnum
ee2d379721fa3697   55 of 171   oracle/apps/crm/service/svcMgmt/srMgmt/srMgmtService/view/SrCategoryVORowImpl
7c6d5790944b1e31   21 of  93   oracle/apps/crm/service/svcMgmt/fwk/model/util/ESSUtil
dabd65b5bd17f2c4    1 of  60   oracle/apps/crm/service/svcMgmt/emailService/applicationModule/server/InboundMessagesServiceImpl
5bae23d854d6f63a    4 of  21   oracle/apps/crm/service/svcMgmt/emailService/util/ChannelKey
1db2a8c903ebcc8b    2 of 415   oracle/apps/crm/service/svcMgmt/emailService/util/SvcMessagingUtil
3400a87aca72567b   10 of 322   oracle/apps/crm/service/svcMgmt/global/model/servletFilter/ActionCaptureServletFilter
6d6280da8f9af505   13 of 238   oracle/apps/crm/knowledge/common/util/CsoSSOUtils
b4b721d53386b24b    3 of  40   oracle/apps/crm/service/svcMgmt/srMgmt/srMgmtService/view/SrCategoryVORowImpl$AttributesEnum
f3fc072732b305e0    3 of  36   oracle/apps/crm/service/svcMgmt/srMgmt/model/entity/SrCategoryEOImpl$AttributesEnum
26c79685a7bee0f5    1 of  14   oracle/apps/crm/service/svcMgmt/emailService/util/SvcChannelInfo
09cd109a344d2b73    5 of   9   oracle/apps/crm/service/svcMgmt/emailService/util/SvcMessageFilters
153de917e34eb411   18 of 128   oracle/apps/crm/service/svcMgmt/publicModel/util/SvcAppContextUtil
bb9e09712811cc9a   88 of 227   oracle/apps/crm/service/svcMgmt/srMgmt/model/entity/SrCategoryEOImpl
66daf99128c7b3aa    4 of  49   oracle/apps/crm/service/svcMgmt/fwk/model/util/SvcBuUtil

Case 2:Via the report generated it looks something like this as attached only two packages covered.

---------------------------------------------------
In the above it seems correct as they are expected to  be covered.
but in case 1 there are more class files than the above 2 , so why is that happening? Does it load whatever is in the memory?


How to exclude all unnecessary classes from the dump being collecteed by Execution Data visitor in Case 1.

Please let me know .
thanks

report.png

ari

unread,
May 23, 2018, 6:27:47 PM5/23/18
to JaCoCo and EclEmma Users
Hi 
resending, can some one can check on this and reply?
thanks

Marc Hoffmann

unread,
May 24, 2018, 1:42:42 AM5/24/18
to jac...@googlegroups.com
Hi,

here is how JaCoCo works:

1) The JaCoCo agents instruments all classes loaded at runtime and inserts probes into them (at least one per method, but could be more depending on the control flow of the method). This data is saved to an exec files. Note that classes which are not loaded at all (missed) will not produce entries in the exec file.

2) When you create a report you define the scope of your report by providing all classes you want to see in your report.

This should answer your questions:

> but in case 1 there are more class files than the above 2 , so why is that happening? Does it load whatever is in the memory?

Because the agent instruments all classes loaded by the JVM.

> How to exclude all unnecessary classes from the dump being collecteed by Execution Data visitor in Case 1.

You can use its “exclude” parameter to exclude certain classes for technical reasons but this does not change the scope of your report (instead classes excluded from instrumentation will show as uncovered)

The correct usage of JaCoCo would be to supply only the classes you want to see in your report to the report generator.

Regards,
-marc


-- 
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/03ed316d-cc75-4685-8794-1e9e78af6890%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages