Hi! My name is Jonathan Lermitage and I am a French programmer. I work with the Java EE, SOA and BPM ecosystems and the NetBeans IDE since 5 years. Jonathan has posted 4 posts at DZone. You can read more from them at their website. View Full User Profile

JaCoCoverage: Java 7 Code Coverage for NetBeans

05.01.2013
| 8752 views |
  • submit to reddit

NetBeans had a (great) plugin for Java 6 unit tests code coverage, for Ant based Java SE projects. This plugin was based on the EMMA library, which is not compatible with Java7.

Now, we have two solutions for Java 7 code coverage:

  • for Maven based projects, check: NetBeans documentation on JaCoCo integration
  • for Ant based projects, a new plugin has been developped: TikiOne JaCoCoverage. Based on JaCoCo, it simply provides code coverage feature for Ant based projects (Java Application, Java Library, Java Project with Existing Sources and NetBeans Modules are supported). Check:
    • GitHub for project's sources, news, future features under development and documentation
    • NetBeans PluginPortal for download. Please note that the plugin is validated and available in the NetBeans Plugins Manager (see Tools, Plugins, Available Plugins and look for TikiOne plugins).

TikiOne JaCoCoverage is free and open source (under LGPL licensing) and currently provides:

  • Code highlighting: covered lines, partially covered lines and not covered lines:
  • Action menus to run JaCoCo with the "run" and "test" Ant tasks. That means you can compute code coverage on project run and (JUnit) tests:
  • A short report displayed in the console:
  • For NetBeans 7.3.

    Published at DZone with permission of its author, Jonathan Lermitage.

    (Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

    Tags: