Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1 Several modifications

open
nobody
None
5
2003-05-08
2003-05-08
Kenneth J. Suda
No

The attached zip file contains the source code with
the following modifications:
- Changed so that you can specify a directory
instead of just a class file. If you specify a
directory, it finds all ".class" files in that directory
and sub-directories and adds those to be
instrumented (or remove instrumentation).
- Changed the list hits class to include some other
output choices. This is done by passing the
appropriate arguments: -m lists the misses, -h
lists the hits, -b lists both hits and misses, and -s
does a HTML summary report. The summary report
outputs an HTML page (crude) that shows
percentage covered/not-covered for each package
and subpackages.

On a side note: somewhere I read that you can not
run JUNIT with Gretel. This is not true. The "trick" I
discovered is to instrument the
junit.textui.TestRunner.class along with your other
classes. You can do this by extracting this class
from the junit.jar you are using and be sure to
include it on your classpath before the junit.jar file.
This worked just fine and I was even able to call it
from an ant script. I am guessing that there is
some "initialization" logic that gets instrumented
into the main method. If this is the case, then it
should be a simple process to add a "main runner"
option that did this initialization then calls the
main method of another class (i.e. the TestRunner
class or any other main method that runs tests).

Also note that I pulled the source from CVS. There
appear to be several changes I got from the
repository that are not in the version 1.0
distribution. Specifically: ConnectionVisitor.java,
Graph.java, and Monitor.java. The zip files contain
the updated versions. It is possible that I made
these changes, since it was a couple months ago
when I was fiddling with it.

Thanks for a Wonderful free solution to do test
code coverage analysis!!!!!!!

Discussion

  • Source and classes of modifications made.

     
    Attachments