You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tool integration: we use on-the-fly instrumenting class and Jacoco java agent
Complete executable reproducer: sorry, there is't
Steps:
As shown in picture 1, the api method has an aspect(which is an around aspect), and from picture 2, we see the aspect method invoke the next method ”getLegInstIds“, which is in picture 3.
From the api method's coverage data which is all green in picture 1 , and the aspect method coverage data which is green and yellow in picture 2, the "getLegInstIds" method should have been invoked, but in picture 3, we see the "getLegInstIds" method doesn't have coverage data.
It isn't a problem with report generating, I checked the exec file's data, and found the "getLegInstIds" method probes were false. I found this issue Line Calling Method which Throws Exception Incorrectly Reported as not Covered #1360, but seems it isn't the same. Because the whole api method is all green, it means it doesn't throw an exception.
Is this a known issue of Jacoco? Or Have I investigate the problem further?
picture 1:
picture 2:
picture 3:
The text was updated successfully, but these errors were encountered:
Hi @sanmuqingliang This really depends on the aspect system you're using and how this is integrated with JaCoCo. Maybe the aspect code is inlined?
If you want to have someone look into this please provide an minimal, executable reproducer.
Hi @marchof Thx for the advice. Because that is our product code, providing an executable reproducer is somewhat difficult. As I checked the code, the aspect was using Spring AOP. We used on-the-fly jacoco agent, I got and decompiled the byte code from the JVM instance which has been changed by Jacoco, and I also checked the probes' value from the exec file, I didn't find anything strange and didn't know how to find the root cause by myself. Could you help to give me some instructions on how to investigate this problem further?
Having literally no experience with the toolstack you're using there is really no advice I can give you. As said before: If you want someone to spend some time on this issue you have to spend your time for an isolated reproducer first. Also creating a minimal reproducer often helps to understand a problem.
Steps to reproduce
As shown in picture 1, the api method has an aspect(which is an around aspect), and from picture 2, we see the aspect method invoke the next method ”getLegInstIds“, which is in picture 3.
From the api method's coverage data which is all green in picture 1 , and the aspect method coverage data which is green and yellow in picture 2, the "getLegInstIds" method should have been invoked, but in picture 3, we see the "getLegInstIds" method doesn't have coverage data.
It isn't a problem with report generating, I checked the exec file's data, and found the "getLegInstIds" method probes were false. I found this issue Line Calling Method which Throws Exception Incorrectly Reported as not Covered #1360, but seems it isn't the same. Because the whole api method is all green, it means it doesn't throw an exception.
Is this a known issue of Jacoco? Or Have I investigate the problem further?
picture 1:
picture 2:
picture 3:
The text was updated successfully, but these errors were encountered: