Core code coverage

44 views
Skip to first unread message

Rock Man

unread,
Dec 7, 2020, 10:58:35 AM12/7/20
to JaCoCo and EclEmma Users
Our JavaFx application involves the use of two .exe files, one to launch the UI and another for the core. The UI .exe file is launched and execution data is captured with the following command:

applicaitonUI.exe -vmargs "-javaagent:%jacoco_dir%\lib\jacocoagent.jar=destfile=C:/automateduitesting/GeoWorxSync_1314/exec/cc_rep_1314.exec,append=false"

The above method provided valid execution data from which an html report can be generated. The .ini file for the core has been modified to contain the following line of code:

-Dvmargs -javaagent:C:/application/jacoco-0.8.7/lib/jacocoagent.jar=destfile=C:/application/cc_rep_core.exec,output=file,append=false

The .exec file is created in the appropriate location, however, every time i use this file to generate a report, the associated report shows 0% of code covered. Any help you can provide will be much appreciated! Thank you!

Marc Hoffmann

unread,
Dec 7, 2020, 2:20:44 PM12/7/20
to JaCoCo and EclEmma Users
Hi,

Why does a class show as not covered although it has been executed?

First make sure execution data has been collected. For this select the Sessions link on the top right corner of the HTML report and check whether the class in question is listed. If it is listed but not linked the class at execution time is a different class file. Make sure you're using the exact same class file at runtime as for report generation. Note that some tools (e.g. EJB containers, mocking frameworks) might modify your class files at runtime. Please see the chapter about class ids for a detailed discussion. 



Regards,
-marc


--
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 jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/2a73389a-9c67-472f-96c6-bd1fe6f16b0cn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages