WARNING: This blog entry was imported from my old blog on blogs.sun.com (which used different blogging software), so formatting and links may not be correct.
Here's a new feature for NetBeans 7.0: Code Coverage support!
First a screenshot:
There are a couple of key points about the code coverage support:
- It is fully integrated into the IDE, and especially the editor. You don't get read-only views of your files with coverage information; the files themselves include coverage highlights. You can view and edit the code directly, use your normal IDE navigation commands to jump around, and so on.
- Enabling and disabling code coverage is trivial. There is no need to modify your build files, run special rake targets etc. Just select the menu checkbox to enable coverage in the new Code Coverage project menu, and then continue as before - run unit tests, run files, run the tests in your project - and the results are updated live as soon as the executed process finishes.
I didn't think a screenshot really described this feature well, so I recorded a couple of quick sessions where I use the feature:
- Here's Ruby (Quicktime, 8.1 Mb, 2 minutes 11 seconds, click on the image - or low-res youtube version):
- Here's Python (Quicktime, 4.3 Mb, 1 minute 5 seconds, click on the image - or low-res youtube version):
Here's a couple more images if you have problems loading the videos:
The Python version is already in the 7.0 builds. The Ruby support isn't integrated yet; it probably needs some tweaking to make it work on Windows.