Real time code coverage viewer tool for inspecting live Java apps?
I've been looking for a code coverage viewer aimed at inspecting live Java applications, mostly webapps running inside an application container like Tomcat. Sure, there are a number of decent tools for getting automatic reports of unit test coverage, but my aim is more like learning in real time what an unfamiliar Java app does e.g. on a specific user interaction.
The Eclipse Java debugger (with JPDA for remote debugging) is really useful, but only if you are already familiar with the application's architecture. And in theory, I could take some coverage tool and set it up to auto-refresh static HTML coverage reports every two seconds, but this is far from optimal.
For Adobe Flex, FlexCover does just what I want by providing a coverage viewer tool that visualizes the coverage in nearly real time, and it's relatively simple to set up at least for somebody who knows the stuff. So is there a similar easy-to-set-up GUI tool, free or non-free, for Java?
You can view Clover's coverage data generated by a web application, in Eclipse, without the need to start the web server from Eclipse.
The trick is to configure the initString in the Eclipse Clover Config screen to point to the same clover.db that your webapp is using:
And - you need to ensure you are using a threaded flushpolicy. The clover-maven2-plugin uses one by default. If you are using Ant, you will need to set it explicitly on <clover-setup/>.
You must also ensure you are using the same version of Clover in both Eclipse and your build tool.
I have tested this locally - and it works quite well!
Please let me know how you go.