Implements the JBlanket Apache Ant task definition that creates reports from the raw intermediate
results collected from the JUnit test cases. This Ant task definition calls the JBlanketReport
class to create the HTML pages that reflect the coverage of a system. The format of the HTML
pages are similar to those of JUnitReport in Ant. All files are stored in the directory
specified by the jblanket.dir system property. If it is not set, the default directory is
<user_home>/<user_account>/jblanket.
Required nested element for the report task:
Optional nested element for the report task:
'sysproperty' - describes additional system properties not set in the environment. If
jblanket.dir is not set as an environment variable, include this nested element
to set it.
For example: see Ant
Required attributes for the report task:
Optional attributes for the report task:
'enable' - describes if a report should be created. Valid values include "true", "on", "yes"
to create a report or "false", "off", or "no" to not create a report.
For example: enable="true"
'verbose' - describes if additional output should be sent to standard out. Valid values include
"true", "on", "yes" for additional output or "false", "off", or "no" for no
additional output.
For example: verbose="false"
'reportformat' - format of the HTML report, either 'frames' or 'noframes'
For example: reportformat="frames"
'toDir' - directory where all HTML files should be sent
For example: toDir="jblanket/html"
'excludeonelinemethods' - describes if methods with one line of code were excluded from coverage.
Values include "true", "on", "yes" when one-line methods were excluded
or "false", "off", or "no" when one-line methods were included.
For example: excludeonelinemethods="false"
'excludeconstructors' - describes if constructors were excluded from coverage. Values include
"true", "on", "yes" when constructors were excluded or "false", "off",
or "no" when constructors were included.
For example: excludeconstructors="false"
'excludeindividualmethods' - describes if individual methods were excluded from coverage.
Values include "true", "on", "yes" when individual methods were
excluded or "false", "off", or "no" when individual methods were
not excluded.
For example: excludeindividualmethods="false"
'totalfile' - name of XML file containing all methods included in the coverage measurement
For example: totalfile="totalMethods.xml"
'testedfile' - name of XML file to contain all tested methods
For example: testedfile="testedMethods.xml"
'untestedfile' - name of XML file to contain all untested methods
For example: untestedfile="untestedMethods.xml"
'onelinefile' - name of XML file containing all one-line methods
For example: onelinefile="oneLineMethods.xml"
'constructorfile' - name of XML file containing all cosntructors
For example: constructorfile="constructorsMethods.xml"
'excludedindividualfile' - name of XML file containing all individually excluded methods
For example: excludedindividualfile="excludedIndividualMethods.xml"
If any of the optional attributes are not specified, their default values specified in the
examples are used. For example, to exclude methods with one line of source code from
the coverage measurement, specifiy the 'excludeonelinemethods' attribute with a 'true' value.
When not specified, one-line methods will be included in the coverage report.
Use this class to execute JBlanketReport with Ant. One example of the 'jblanketreport'
Ant target is:
<taskdef name="jblanketreport" classname="csdl.jblanket.ant.JBlanketReportTask"/>
<jblanketreport excludeonelinemethods="true"
totalfile="myTotalMethods.xml"
testedfile="myTestedMethods.xml"
reportformat="frames"
verbose="true"/>
From the example, one-line methods were excluded and constructors were included. No methods
were individually excluded. The total methods are stored in 'myTotalMethods.xml', tested
methods will be stored in 'myTestedMethods.xml'. Untested methods will be stored in its default
file and excluded one-line methods are stored in its default file. The HTML report will use
frames. Additional output will be sent to standard out.
Another more basic example is:
<jblanketreport verbose="true"/>
where all files are referred to by their default values and one-line methods and constructors
are included in the coverage measurement. Additional output will not be sent to standard out.
The HTML report format will use frames.
author: Joy M. Agustin version: $Id: JBlanketReportTask.java,v 1.1 2004/11/07 00:32:33 timshadel Exp $id |