According to https://groups.google.com/d/msg/jacoco/d-30r6hVrV4/d_3Dk3GdCgAJ, 
this was indeed because of that the decompiled classes has no 
LineNumberTable.

So, while the document says " To calculate line coverage class files must 
contain line number attributes. ", is this possible to get method coverage 
without line numbers?

在 2019年1月5日星期六 UTC+8上午6:53:40,Evgeny Mandrikov写道:
>
> Glad that this was helpful and thank you for your understanding.
>
> On Friday, January 4, 2019 at 10:43:50 PM UTC+1, Tool Ply wrote:
>>
>> Ok, this indeed helps me, so sorry for providing the blurred question. I 
>> will try this, and if I need, provide complete information next time
>>
>> 在 2019年1月5日星期六 UTC+8上午2:47:53,Evgeny Mandrikov写道:
>>>
>>> Hi,
>>>
>>> On Friday, January 4, 2019 at 5:43:23 PM UTC+1, Tool Ply wrote:
>>>>
>>>> I recently worked on applying jacoco on android app coverage. There is 
>>>> an interesting phenomenon. 
>>>>
>>>> When I package the bytecodes both of the APK and my self-designed hook 
>>>> tool, which will hook getPackageInfo API of Android and return pre-set 
>>>> value in runtime, in a combined jar, and then instrumented by jacoco, 
>>>> jacoco will not respect that the coverage data came from that combined jar 
>>>> so that just get total method num but with no coverage.
>>>>
>>>> Because it is high-cost for me to verify this, so I want to know does 
>>>> the hook affect jacoco's coverage analysis mechanism in principle?
>>>>
>>>
>>> Sorry, but at least for me (and probably will be for others) completely 
>>> unclear what "hook" really means, what it really does, especially given 
>>> that it is "self-designed", how/when instrumentation and analysis are 
>>> actually performed, etc, etc.
>>> Also, as you might have noticed from past discussions, note that small 
>>> JaCoCo Team (primary responders in this ML) works on project in spare time, 
>>> has very basic knowledge of Android specifics,
>>> and does not provide integration with Android directly (Java bytecode is 
>>> not Dalvik bytecode, Java agents are not available on Android) - 
>>> third-party integrations use our APIs.
>>> Finally if for you it has "high-cost to verify", then, summarizing all 
>>> above, for us even attempts to guess will have much higher cost.
>>> Please also note that unlike "self-designed hook", all code and 
>>> documentation about JaCoCo are available publicly.
>>>
>>> The best way to get attention in investigation of your "interesting 
>>> phenomenon" - is to provide *complete, runnable, debuggable and 
>>> verifiable by others* example of this phenomenon.
>>>
>>>
>>> However speaking about "total method num but with no coverage" :
>>>
>>> if there is no information about lines at all, then as was already said 
>>> in https://groups.google.com/d/msg/jacoco/d-30r6hVrV4/d_3Dk3GdCgAJ :
>>> quoting FAQ ( https://www.jacoco.org/jacoco/trunk/doc/faq.html ): 
>>> "Class files must be compiled with debug information to contain line 
>>> numbers."
>>>
>>> if information about lines is there and no information about coverage at 
>>> all, then
>>> either analyzed classes do not match executed classes - see 
>>> https://www.jacoco.org/jacoco/trunk/doc/classids.html
>>> or there is no information about executed classes - see "sessions" page 
>>> in html report, "execinfo" command in command line interface ( 
>>> https://www.jacoco.org/jacoco/trunk/doc/cli.html ) and check 
>>> third-party code that retrieves this information from Android and performs 
>>> instrumentation.
>>>
>>>
>>> Hope this helps.
>>>
>>>
>>> Regards,
>>> Evgeny
>>>
>>>

-- 
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/ff522919-c553-4982-b84d-2e437fddaea4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to