David E Jones wrote:
Do you really need a code coverage tool in order to do tests? I guess I'm not quite sure what you're getting at with this question...
So that you know every branch, every test, every exception block, every method, is actually being executed.
If you have some if statement, who's true block is never executed, then how can you be certain whether the condition is specified correctly?
Since most of ofbiz is loaded thru a custom classloader, it makes it simple to deal with; For each class in each jar loaded, add the instrumentation(by use of a temp file). I've got experience with cobertura, but that's GPL, so not compatible with apache software.
There are quite a few potential tools for testing these things, but a JUnit class or a Service Engine service run as a test are nice options.
The version I sent earlier was completely broken. I've since fixed it, but will run with it a bit more before opening this up thru jira.
