Unit Tests Code Coverage Plugin (updated for NetBeans 7.0) - plugin detail
The good old "Unit Tests Code Coverage Plugin", updated to work with NetBeans 7.0.
A code coverage tool based on Emma, integrated with JUnit.
| Plugin owner: |
ent38 |
| Website: |
|
| Added: |
2011-05-10 |
| Last updated: |
2011-10-18 |
| NetBeans Versions: |
6.9, 7.0, 7.1 |
| License: |
CDDL |
| Category: |
Testing |
| Size: |
0.30 MB |
| Downloaded: |
3,220 times |
| Rating: |
|
Verifications for NetBeans versions
Plugin is not subject to any verification |
Introduction
The good old "Unit Tests Code Coverage Plugin", updated to work with NetBeans 7.0. - Dependencies have been updated,
- Deprecated code has been replaced
This is a compatibility build only, there's no bugfix or new feature.
Please note that I am NOT the original author of this excellent plugin. So, for instance, I am no able to provide bugfixes.
For the original page, check http://plugins.netbeans.org/plugin/5620/unit-tests-code-coverage-plugin.
What's new in this version
- Works with NetBeans 7.0.
- Because the download link for the Code Coverage Plugin for NetBeans 6.9 is hard to find (it leads to a tutorial), I've included a distribution built with NetBeans 6.9.1 too.
Remember : please unzip the file before. You'll find plugins for NetBeans 7.0 (and 7.0.1) in the "for NB 7.0 and 7.0.1" directory, and plugins for NetBeans 6.9.1 in the "for NB 6.9.1" directory.
|
[ You have to be logged in to be able to comment. ]
User Comments
Re: Is JDK7 supported ?
Indeed, it looks like the errors I got.
though, thanks for your reactivity !
Posted by aurelman on Nov 03, 2011
Re: Is JDK7 supported ?
Hi,
good question !
Unfortunately, no. I had not tested with JDK7.
Thx for your feedback. I'll try to fix this issue asap.
[edit1] Bad news :(
=> http://stackoverflow.com/questions/7010665/testng-emma-coverage-and-jdk-7-result-in-classformaterror
Tools like Emma seem to have problems with JDK7.
Posted by ent38 on Nov 03, 2011
Is JDK7 supported ?
Hi,
First of all, thanks for porting this plugin to netbeans 7. It's a cool tool !
But I have a question : has this plugin been tested with JDK7 ?
I encounter problems when I use JDK7 : I get error on all when executing unit tests, all my tests fail unless I deactivate the code coverage.
I did not get those errors when using JDK6 and all my tests pass.
Thanks & Regards
Posted by aurelman on Nov 03, 2011
Re: EMMA install fails for 7 - update
You can try the ZIP version of NetBeans ("OS Independant Zip" in the Platform's combo-box, of download page).
You only have to
- extract the ZIP file
- edit the (unzippedDir)/etc/netbeans.conf :
--> choose a value for the "netbeans_default_userdir" property (ex: "C:/Java/__prefs__/nb701" for my Windows install)
--> choose a value for the "netbeans_jdkhome" property (ex: "C:\Java\jdk1.6.0" for me)
After that, yo have a portable version of NetBeans, and you can launch it via the (unzippedDir)/bin/netbeans executable.
To remove this version of NetBeans, simply remove the (unzippedDir) folder, and the folder denoted by the "netbeans_default_userdir" property.
If your classical installation of NetBeans has a configuration problem, this portable version may work.
If the plugin installation still fails... no, it will work :D
I'll try to find a Mac computer next week, to make some tests.
Posted by ent38 on Sep 13, 2011
Re: EMMA install fails for 7 - update
@ent38: thanks for all your help.
It is still unsuccessful. Code Coverage installs fine, but emma not. I get the message:
Warning
StandardModule:null jarFile: /Applications/NetBeans/NetBeans 7.0.1.app/Contents/Resources/NetBeans/extra/modules/ext/emma.jar[invalid] is not a valid NetBeans module.
In various directories within NetBeans (on Mac OS X in the Contents under Resources, NetBeans, extra) I do find EMMA-related files. In particular, com-vladium-emma.jar, com-vladium-emma.xml (in three locations), and emma.jar. But EMMA is reported as not installed, and restarting the IDE will trigger another complaint (that Code Coverage cannot be activated because EMMA is not installed).
What could be wrong with emma.jar?
Posted by wstomv on Sep 12, 2011
Re: EMMA install fails for 7 - update
The "Module Manager" is a plugin you can find and download from the "Plugin Portal" update center (already registered into NetBeans).
So, here are new versions of the Code Coverage modules :
- http://netbeanscolors.org/files/netbeans-codecoverageplugin/70/altbuild-20110909-1838/com-vladium-emma.nbm
- http://netbeanscolors.org/files/netbeans-codecoverageplugin/70/altbuild-20110909-1838/org-netbeans-modules-coverage.nbm
I hope it will work :D
Posted by ent38 on Sep 09, 2011
Re: EMMA install fails for 7
I assume that by Module Manager you mean Tools > Plugins.
EMMA is not mentioned as installed (but it is nevertheless mentioned in messages.log as being problematic).
I now uninstalled Code Coverage Support successfully (no problem there).
I'll await the new package. Thanks.
Posted by wstomv on Sep 09, 2011
Re: EMMA install fails for 7
Ok, I've found a config problem in the EMMA module project (a compilation warning : "spec.version.base" was not set).
I'll package and upload a new version at ~7:00 p.m. (GMT+1), after my working day :)
Posted by ent38 on Sep 09, 2011
Re: EMMA install fails for 7
You can install the "Module Manager" and use it (Tools > Module Manager) to see if the EMMA (v2.0.5312) module is installed & loaded.
It is located in the "Tools" node.
Uninstall "EMMA" and "Code Coverage Support" via the Module Manager (right-clic > Uninstall XXXX).
The uninstallation dialog may stop responding : you can close it and restart Netbeans. NetBeans startup will say that it cannot load a module (EMMA or Code Coverage Plugin, according to the module you uninstalled first) : simply choose the "Disable module and continue" button.
Before, you can backup your .netbeans/7.0/ folder. If the module uninstallation breaks NetBeans, you'll only have to restore this folder.
I'll try to package another version of this plugin.
Posted by ent38 on Sep 08, 2011
Re: EMMA install fails for 7
System info from NetBeans About window:
Product Version: NetBeans IDE 7.0.1 (Build 201107282000)
Java: 1.6.0_26; Java HotSpot(TM) 64-Bit Server VM 20.1-b02-384
System: Mac OS X version 10.6.8 running on x86_64; MacRoman; en_US (nb)
In messages.log there are various warnings concerning emma (which is strange, because it supposedly was not installed). For instance:
WARNING [org.netbeans.core.startup.ModuleList]: Error encountered while reading com.vladium.emma
msg
Caused: org.netbeans.InvalidException: Not a module: no OpenIDE-Module tag in manifest of StandardModule:null jarFile: /Applications/NetBeans/NetBeans 7.0.1.app/Contents/Resources/NetBeans/extra/modules/ext/emma.jar[invalid]
How can I uninstall that emma.jar safely? It might not be a good idea to just delete it. In fact, within the NetBeans app package (Mac OS X), there are five emma related files, three com-vladium-emma.xml, and two .jar (one emma.jar, the other com-vladium-emma.jar).
By the way, I tried to install com-vladium-emma.nbm as provided separately by ent38, but that gives the same timeout failure.
Thanks for looking into this.
Posted by wstomv on Sep 08, 2011
Re: EMMA install fails for 7
Thx for your reply.
I've just tried a fresh install of NB 7.0.1 on Windows XP SP3 (32bits) and JDK7, with the same list of plugins (Java SE pack + EasyPMD and ShowAndChangeLineEndings).
After NetBeans updates (patch1) and the installation of EasyPMD and ShowAndChangeLineEndings, The Code Coverage plugin installed successfully.
Meanwhile, I was unable to extract correctly the ZIP via Windows : only the EMMA nbm was extracted.
Any other ZIP tool (7zip for me) extracted the ZIP correctly.
=> What is your OS, JDK version, and how did you extract the "1306588823_Code Coverage Plugin for NB70 and NB691 - please unzip it before" ZIP file ?
I don't know if it will help - I have uploaded the Code Coverage plugin NBM files for NetBeans 7.0.x at :
- http://netbeanscolors.org/files/netbeans-codecoverageplugin/70/com-vladium-emma.nbm
- http://netbeanscolors.org/files/netbeans-codecoverageplugin/70/org-netbeans-modules-coverage.nbm
To finish, is there any useful information in the messages.log file ? (in .netbeans\7.0\var\log\)
Posted by ent38 on Sep 07, 2011
EMMA install fails for 7
@ent38
I have listed my currently installed plugins in the original comment below.
Further advice would be welcome.
Posted by wstomv on Sep 07, 2011
Mercurial Repositories
Hi,
you can get the project sources from the "main/misc" NetBeans Mercurial repository (the "codecoverage" project) :
http://hg.netbeans.org/main/misc/
Posted by ent38 on Aug 30, 2011
ejb and web projects
It Would be great if the plugin would work doe EJB and WEB based projects.
Don't know much about plugins yet but willing to learn and assist...
Where can I get the project source?
Posted by davti on Aug 30, 2011
Re
I had the timeout problem too, but EMMA always installed fine.
Can you show your list of installed plugins ? (in order to try to reproduce the bug)
Posted by ent38 on Aug 25, 2011
Install of EMMA fails under NetBeans 7.0.1
When trying to install the two (new versions of the) plugins, I get the error message:
The Plugin Installer found problem timeout of loading EMMA[com.vladium.emma/2.0.5312] while install the following plugins:
EMMA
The other plugin initially gave similar trouble, but installed after restarting the IDE.
Several restarts and redownloading of the plugins did not help for EMMA.
Any idea how to repair this?
Added information
NetBeans IDE 7.0.1 (Build 201107282000)
List of currently installed plugins:
Database
Subversion
Spellchecker
Hudson
Local History
IDE Branding
Mercurial
IDE Platform
Spellchecker English Dictionary
CVS
Bugzilla
NetBeans Plugin Development
Show and change line endings
EasyPmd
Java
Java Persistence
Java Profiler
Spring Beans
Ant
JUnit
Hibernate
Maven
GUI Builder
Java Debugger
Code Coverage Plugin
Software as a Service
Posted by wstomv on Aug 25, 2011
Re
Hi,
this plugin works with ant projects only, and the "Generate Debugging Info" option has to be activated in the project properties. It needs JDK6, but I have no problem with JDK5.
Did you import the two modules ? "com-vladium-emma.nbm" and "org-netbeans-modules-coverage.nbm".
After that:
- right clic on the project / Coverage / Activate Coverage Collection
- run your JUnit tests
- now your java source code is colored according to the coverage information
I've just verified it with clean installation of NB 7.0 and 7.0.1.
If you still experience problems, can you provide more informations about your Java project (is it an application, library ?), NetBeans and OS ?
Posted by ent38 on May 28, 2011
Thanks for anther
Thanks
But when i import the plugin, Ican't find Emma in my installed plugins and my coverageLink is out of click
Thanks
Posted by superleng on May 27, 2011
Thanks
Thanks very much.
I had been struggling to get Cobertura configured, without success.
So this is a great relief.
Much appreciated
Best wishes
Julian
Posted by jrcbriggs on May 11, 2011