No source code highlighting being generated

70 views
Skip to first unread message

gils...@gmail.com

unread,
Dec 8, 2016, 12:23:24 PM12/8/16
to JaCoCo and EclEmma Users
Setup is JBoss 4.3 running a project with unit tests being run via ant.

I am generating the coverage on the JBoss project.

The report generates but there is no view source generated with colored line coverage.
The java files are in the fileset directory.
Thoughts?
Thanks

here is the report generation script
<jacoco:report>
<executiondata>
<file file="jacoco.exec"/>
</executiondata>
<structure name="mes-webservices-unittest">
<classfiles>
<fileset dir="${deploy.dir}/${project.name}.ear">
<include name="*.war"/>
<include name="*.jar"/>
</fileset>
</classfiles>
<sourcefiles encoding="Cp1252" >
<fileset dir=".." />
</sourcefiles>
</structure>
<html destdir="report"/>
<csv destfile="report/report.csv"/>
<xml destfile="report/report.xml"/>
</jacoco:report>

Marc R. Hoffmann

unread,
Dec 9, 2016, 5:44:25 PM12/9/16
to jac...@googlegroups.com
Hi,

did you have a look at our FAQ? http://www.eclemma.org/jacoco/trunk/doc/faq.html

Why does the coverage report not show highlighted source code?

Make sure the following prerequisites are fulfilled to get source code highlighting in JaCoCo coverage reports:

  • Class files must be compiled with debug information to contain line numbers.
  • Source files must be properly supplied at report generation time. I.e. specified source folders must be the direct parent of the folders that define the Java packages.

Please especially check whether the last point is fulfilled.

Regards,
-marc

gils...@gmail.com

unread,
Dec 12, 2016, 1:36:03 PM12/12/16
to JaCoCo and EclEmma Users
Well I verified the debug information and the source files are being supplied.

I am guessing it has something to do with this statement "specified source folders must be the direct parent of the folders that define the Java packages".
Can I get an example of this structure?

The there are several projects in this system.

but a simplified view is as follows where src contains all the java files and dist contains the jars compiled with debug information.


+---CarrierService
| +---src
| +---target
| | +---dist
+---Common
| +---src
| +---target
| | +---dist
+---UnitTests
| +---src
| +---target


Evgeny Mandrikov

unread,
Dec 12, 2016, 4:54:42 PM12/12/16
to JaCoCo and EclEmma Users, gils...@gmail.com
Wild guess that Marc was referring to use of ".." in fileset.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages