Advanced Usage of GroboCoverage
How GroboCoverage Works
GroboCoverage works by inserting "probes" into the post-compiled class files. These probes call out to a logger (more on that later), telling it which class, method index, and probe index was invoked.
During the post-compilation of the class files, a set of data files get generated, which record what a method index and probe index translate into with regards to the source file.
The reporting phase combines the post-compilation data files with the log data from the loggers to generate XML reports, and from that HTML reports using XSL-T.
The base logger class
This static class discovers the registered channels at class load time through
The initialization routine creates a number of channels from the specified logger factory (whose fully-qualified class name is given in the properties with the key "factory"). The number of channels comes from the key "channel-count". All property keys starting with "logger." are passed to the factory class for initialization.
Currently, all logger implementations output the probe information to plain text files in a logging directory (specified by the key "logger.dir"), one file per class. The format of this file is simply a series of lines, each specifying a single probe:
There can be duplicates of these method/probe pairs, which will be condensed down during report parsing. The filename reflects the class name with a CRC check (so different class files with the same name don't confuse the logger), and each channel outputs to its own sub-directory in this logging directory.
This means that if you have several coverage runs, logging to different directories (or even across machines), all you need to do is concatenate the files with the same name together (order isn't important), and copy the one-off log files into those directories. The reporting task will do the rest
However, an alternate logger style, called the "single" style, puts all the
logging data into a single file. It requires modifying the
channel,class signature,methodIndex,probeIndexper line.
Each probe added to the post-compiled class files adds several instructions
to the bytecode. They setup the invocation to the static method in the
This space graciously provided by the SourceForge project
2002-2004 GroboUtils Project.|
All rights reserved.