How to set up Jacoco code coverage tool in Eclipse for viewing colors in Java code?

12,500

Solution 1

You can download the Eclemma plugin from Eclipse marketplace.

  1. Open Marketplace from Help menu.
  2. Search for Eclemma Java Code Coverage.
  3. Install and Restart Eclipse.
  4. Right-Click on the project, select Coverage as -> JUnit Test

Solution 2

http://www.eclemma.org/userdoc/importexport.html mentions being able to import reports, but that they have to be exactly the same class files both when the report was generated and within the Eclipse workspace. It may work, it may not.

Share:
12,500
xploreraj
Author by

xploreraj

Updated on June 04, 2022

Comments

  • xploreraj
    xploreraj almost 2 years

    I have setup jacoco in jenkins as part of functional test job to generate code coverage report. But I feel its very tough to understand.

    Somewhere I read that covered and uncovered lines of code are shown in colors in Eclipse. This is for functional tests which connect to a stage where the whole business logic has been deployed. This is present inside Eclipse also as part of the project. How to set it up?

    What difference the setup has for unit tests?