Implements the JBlanket Apache Ant task definition that launches the application to exclude
individual methods. The system covered is displayed as a tree, with methods as the leaves. The
Font used to display each method is altered to reflect the category of the method, e.g., tested,
untested, one-line, etc. Methods chosen to be excluded by the user within this application are
stored in the directory specified by the jblanket.dir system property. If not set, the default
directory is <user_home>/<user_account>/jblanket/.
Required nested element for the application task:
Optional nested element for the application 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 attribute for the application task:
Optional attributes for the application task:
'enable' - describes if the application should be launched. Valid values include "true", "on",
"yes" to launch the application or "false", "off", or "no" to not launch the
application.
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"
'excludeonelinemethods' - describes if methods with one line of code were excluded from coverage.
Values include "true", "on", "yes" to identify the one-line methods
or "false", "off", or "no" to not identify them.
For example: excludeonelinemethods="false"
'excludeconstructors' - describes if constructors were excluded from coverage. Values include
"true", "on", "yes" to identify constructors or "false", "off",
or "no" to not identify them.
For example: excludeconstructors="false"
'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 to contain/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 distinguish methods with one line of source code from the
coverage measurement, specify the 'excludeonelinemethods' attribute with a 'true' value.
When not specified, one-line methods will not be distinguished in the application.
Use this class to execute JBlanket with Ant. One example of the 'jblanketapp' Ant target is:
<taskdef name="jblanketapp" classname="csdl.jblanket.ant.JBlanketAppTask"/>
<jblanketapp>
<sysproperty key="jblanket.dir" value="$jblanket.dir" />
</jblanketapp>
From the example, only tested and untested methods from the files found in jblanket.dir are
distinguished. No additional output will be sent to standard out.
Another example is:
<jblanketapp excludeonelinemethods="true"
verbose="true" />
where one-line methods are distinguished, but constructors are not. Additional output will be
sent to standard out.
Individually excluded methods are always identified. Only the file in which they are stored can
be changed.
NOTE: For JBlanket to successfully launch the application, all related files MUST exist in
jblanket.dir.
author: Joy M. Agustin version: $Id: JBlanketAppTask.java,v 1.1 2004/11/07 00:32:33 timshadel Exp $ |