Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EclEmma Line Number Output Java Eclipse Plugin

I installed EclEmma (Code Coverage Eclipse Plugin ) , When I build my code EclEmma Highlights code lines in order to they have been used or not in this running , my question is can EclEmma output the which line number has been executed and which aren't or it can only highlight lines? because I want to compare two large source codes , I need line number outputs. It can count total number of lines that has been executed and it's strange for me that it dosen't output which line numbers!

enter image description here

like image 806
ᴀʀᴍᴀɴ Avatar asked Sep 17 '16 15:09

ᴀʀᴍᴀɴ


People also ask

How do I run Emma code coverage in Eclipse?

The Eclipse Plug-InThe plugin can be easily installed from its update site at http://update.eclemma.org/ on any Eclipse installation of version 3.5 or above. It is also available from the Eclipse Marketplace. After you have installed the plugin, you can run your tests using the new Coverage As launch configuration.

How does Eclipse calculate code coverage percentage?

Eclipse can check your code coverage when it runs your JUnit testing class. This means that it can show you what statements were executed in at least one test case and what ones weren't. For an if-statement, it will tell you whether there was a test case for the condition to be false and another for it to be true.


1 Answers

Line numbers are provided in EclEmma (JaCoCo) XML reports. You can create them either by using Ant, Gradle or Maven, or export the coverage report data from Eclipse (File/Export/.../Coverage Report).

like image 106
aventurin Avatar answered Oct 25 '22 15:10

aventurin