jacoco lost some coverage

53 views
Skip to first unread message

felix1...@gmail.com

unread,
Jan 23, 2017, 10:02:08 PM1/23/17
to JaCoCo and EclEmma Users
JaCoCo version:0.7.8
Operating system:linux
Tool integration: Maven+jacoco agent

I use jacoco agent to dump exec file,then use maven-plugin generate report

@Override
public GetCTaskTreeTypeResponse getCTaskTreeType(GetCTaskTreeRequest request) throws Exception {
GetCTaskTreeTypeResponse responseType = new GetCTaskTreeTypeResponse();
ResponseStatusType responseStatusType = new ResponseStatusType();

try {
responseType = TaskBusiness.getCTaskTreeType(request);
responseStatusType.setAck(AckCodeType.Success);

In this class, TaskBusiness.getCTaskTreeType(request) is covered ,but TaskBusiness's coverage is 0%.

Element Missed Instructions Cov. Missed Branches Cov. Missed Cxty Missed Lines Missed Methods Missed Classes
Total 5,201 of 5,201 0% 662 of 662 0% 365 365 877 877 28 28 1 1
TaskBusiness 5,201 0% 662 0% 365 365 877 877 28 28 1

Marc R. Hoffmann

unread,
Jan 24, 2017, 1:00:05 AM1/24/17
to jac...@googlegroups.com
Hi,

on the top right corner of the HTML report there is a link "sessions".
On that page:

1) Is the your class TaskBusiness listed?
2) Does the TaskBusiness entry have a html link on the sessions page?

Also check your maven build output: Is there any message from the report
goal?

Cheers,
-marc

felix1...@gmail.com

unread,
Jan 24, 2017, 1:23:05 AM1/24/17
to JaCoCo and EclEmma Users
yes,on the session page,TaskBusiness is listed:
hotel.order.suppliertaskservice.business.TaskBusiness 24709a23be503103
but no html link on the TaskBusiness entry.

on maven output:
[WARNING] Execution data for class hotel/order/suppliertaskservice/business/Task
Business does not match.

i don't know how is this, how to fix this issue?


=============================================================================

Evgeny Mandrikov

unread,
Jan 24, 2017, 3:27:22 AM1/24/17
to JaCoCo and EclEmma Users, felix1...@gmail.com
If class used at runtime during collection of his coverage into "jacoco.exec" is not the same as class used during generation of report from "jacoco.exec", then message  "Execution data for class ... does not match" is shown. Before fix, first required to understand what is a cause of this in your case, and this requires more details about your case, so please read http://www.jacoco.org/jacoco/trunk/doc/classids.html , in particular chapter "What can cause different class ids?"
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages