Last Updated: October 20, 2022
How to Install and Use EclEmma
In this tutorial, we will show you how Install and Use EclEmma.
EclEmma is a free Java code coverage tool. It brings code coverage analysis directly into the Eclipse workbench: Fast develop/test cycle: Launches from within the workbench like JUnit test runs can directly be analyzed for code coverage.
Steps:
- 1.Install EclEmma.
-
-
Go to Help.
-
Select Eclipse MarketPlace.
-
Then Search for EclEmma on the MarketPlace.
-
Select EclEmma Java Code Coverage.
-
Click Install.
-
Click on accept.
-
Click Finish.
-


It will ask you to restart the IDE, Click Restart Now.

- 2.Open the JUnit Project.

- 3.Coverage As JUnit Test.
-
Run Project as Coverage :
-
Right-click on the Project.
-
Select Coverage As.
-
Select JUnit Test.
-
After running the Coverage tool tab will appers as shown in the figure below.

Extend the files as the figure below, it will show the percentage.
green as covered and red not, you can see the method which did not covered in the coverage test. |

Let’s see the method which did not get covered its "testAddWrongNumbers" method, as shown below figure, The green code shows that method covered, the red did not get covered.
you have total coverage 73.5% ,and for the AppTest.java 66.7%, 0.0% for "testAddWrongNumbers" method, and 100% for App.java .
That is How to Install and Use EclEmma, Enjoy.