Want to get what type code can not be covered by jacoco

42 views
Skip to first unread message

aaron_z...@msn.com

unread,
Oct 15, 2019, 11:03:27 PM10/15/19
to JaCoCo and EclEmma Users
hi :

we have a problem, which we found that some codes can not be covered by jacoco.

such as, field definition, enum type definition, some construction function.

Can you provide with some topics for  support code coverage type? recommend it  to us . 

Thanks!

Evgeny Mandrikov

unread,
Oct 16, 2019, 5:13:53 AM10/16/19
to JaCoCo and EclEmma Users


On Wednesday, October 16, 2019 at 5:03:27 AM UTC+2, aaron_z...@msn.com wrote:

we have a problem, which we found that some codes can not be covered by jacoco.

such as, field definition, enum type definition, some construction function.

Please describe in detail what means "some codes can not be covered by jacoco" by providing exact complete examples, screenshots and descriptions of behaviors expected by you and actual one?

Aaron zhang

unread,
Oct 17, 2019, 10:00:44 AM10/17/19
to JaCoCo and EclEmma Users
Such as,  left image is jacoco result, right image is IntelliJ IDEA Coverage result.  why don't coverage the first line the class?

Step:
 1.  Jacoco, we use on-the-fly mode and tcp mode agent.  call the http controller api. Last result is just like below image.  Surely, the RequestMapping function can be coverage

2. IntelliJ IDEA Coverage is running in local. launch service, call the same http controller api above. 


屏幕快照 2019-10-17 下午9.30.01.png




在 2019年10月16日星期三 UTC+8上午11:03:27,Aaron zhang写道:

Aaron zhang

unread,
Oct 17, 2019, 10:19:34 AM10/17/19
to JaCoCo and EclEmma Users
we use Spring boot

Similarly, the annotation class name cannot be coverage, in additionally,  static variable cannot be coverage, too. please, look at below:

屏幕快照 2019-10-17 下午10.14.36.png




在 2019年10月17日星期四 UTC+8下午10:00:44,Aaron zhang写道:

Aaron zhang

unread,
Oct 17, 2019, 11:10:45 AM10/17/19
to JaCoCo and EclEmma Users
sorry, i know the reason.

because, web http service is requested, and just the controller. and, the static variable and class are executed, surely, will not be execute by next request.

thanks!

在 2019年10月16日星期三 UTC+8上午11:03:27,Aaron zhang写道:
hi :
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages