Unit Tests Code Coverage Plugin - plugin detail

The Unit Tests Code Coverage plugin is a NetBeans 6.0 / 5.0 (5.5, 5.5.1) module which displays the unit tests code coverage in the NetBeans java sources editor.

NetBeans Plugin - Unit Tests Code Coverage Plugin
Plugin owner: mikk
Website: http://wiki.netbeans.org/TutorialCodeCoveragePlugin
Added: 2008-01-30
License: CDDL
Category:
Downloaded: 6,778 times
Rating:
 4.28, by 10 users

Plugin Log Show log

Versions available

Download plugin   Download size: N/A   Last Update: 2010-05-11

What's new in this version



Verifications for NetBeans versions

Plugin is not subject to any verification



Introduction

Features

The functionality provided by the plugin helps to visually (and quickly) identify the portions of java code with low coverage and helps in targeted tests development. The plugin provides the following features:

  • Java sources coloring according to the coverage information from the latest unit tests execution
  • Automated java code markup updated after running unit tests or reopening file
  • Code coverage markup info displayed at the java editor sidebar
  • Currently Java Application, Java Library, Java Project with Existing Sources and NetBeans module projects are supported.

How to use

The module must be enabled for each project by invoking the Coverage | Activate Coverage Collection action from the project node's context menu. Then, as unit tests are run, the module will update the code coverage data and markup the editor's lines accordingly. The lines which are fully covered by unit tests are annotated with green color in java editor and the line covered partially are annotated in yellow. The colors can be modified in Tools | Options | Fonts & Colors | Annotations.

More information is available in online tutorial

[ You have to be logged in to be able to comment. ]

User Comments

  

Web Project Code Coverage : no (see the plugin description / introduction)

Unfortunately, no :
"Currently Java Application, Java Library, Java Project with Existing Sources and NetBeans module projects are supported."
Posted by ent38 on Jul 20, 2011
  

Web Project Code Coverage

I would be obliged to know if it is possible to use this plugin for code coverage of web services development netbeans project.
Posted by Tamim on Jul 18, 2011
  

Re, add UC

to add the Update Centers and install the Code Coverage Plugin :

- go to "Tools" / "Plugins"
- go to the "Settings" tab
- clic "Add"
--- Name = Dynamic Development UC
--- URL = http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/nbms/updates.xml.gz
- clic "OK"
- repeat that for the Static Development UC
- go to the "Available Plugins" tab and clic "Reload Catalog"
- in the list of available plugins, you'll find the "Code Coverage Plugin" (you can type "code coverage plugin" in the search field)
- select the plugin and install it
- have fun :D

The "old" version works with NetBeans 6.0 to 6.9 only, but is not compatible with NB 7. I've updated its dependencies to make it compatible with NB 7 : http://plugins.netbeans.org/plugin/38945 .

If you experience too many problems with Update Centers, I'ill try to upload the compiled plugin for NB 6.0/6.9 in a few days.

[edit] go to http://plugins.netbeans.org/plugin/38945/ , I've included the plugin compiled with NB6.9.1.
Posted by ent38 on May 28, 2011
  

thanks ent38 for another

thanks ,but I'm sorry, i'm a new comer , If you have a java Coverage Plugin for NetBeans 6.0 to 6.9, can you mail it to me ? thans very much
my mail: lengjunjie19811020@163.com
Posted by superleng on May 27, 2011
  

Add UC and check for plugin

Hi,
you can add some Update Centers to NetBeans :

Dynamic Development UC :
http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/nbms/updates.xml.gz

Static Development UC :
http://updates.netbeans.org/netbeans/updates/dev/uc/final/main/catalog.xml.gz

Check for available plugins. After that, you may find the Code Coverage Plugin for NetBeans 6.0 to 6.9.
Posted by ent38 on May 27, 2011
  

How can i get the plugin

I'm sorry,but how can i get the plugin,i cann't find a link to download it,thank you
Posted by superleng on May 27, 2011
  

How to configure unit test code coverage plug-in

Very nice tool. Simple to use, and the highlighting of tested lines makes it very easy to see where more testing is needed.

Are there any user-configurable settings for the unit test code coverage plug-in? For example, defining filters to include or exclude certain packages, etc.

Thanks,
Mike
Posted by mwoinoski on Jan 15, 2010
  

Where can I get source code

I'd like to fix this to work with Maven....
Posted by caoimhin_b on Nov 16, 2009
  

Thanks - works well with J2SE but not at all with J2ME.

For J2ME the Coverage Project menu item is greyed out. Getting this working for J2ME projects would be very much appreciated.
Posted by djmills on May 12, 2009
  

Thanks - Very useful

Would like highlight to include continuation lines as well.
Posted by crashmeister on Dec 10, 2008
  

Web Projects?

It would be great if this supported web projects. I like the functionality in normal projects.
Posted by ranbato on Nov 25, 2008
  

I second that...

It is very disappointing not to see this plugin work with maven based projects. Unfortunately all my projects are maven projects, which makes this plugin useless for me.... Too bad.... Guess I can uninstall the plugin now... :(
Posted by leviter on Jun 06, 2008
  

Does not work with Maven

Just a heads up, don't expect this to work if you manage your project with maven. Sad
Posted by thepope on Feb 23, 2008
  

Good work.

i think all developers really need it.
thanks
Posted by azizi on Feb 22, 2008
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo