Generating baseline and probescript files in remote build environments
Before code coverage statistics can be generated in the
build, your Ant script must generate baseline and probescript files.
About this task
Procedure
Open your Ant build script file and add text like the following
example:
<target name="appanalysis">
<path id="appanalysis">
<pathelement location="${code-coverage-plugins-dir}/${llc-engine-plugin}"/>
<pathelement location="${code-coverage-plugins-dir}/${eclipse-jdt-core-plugin}"/>
<pathelement location="${code-coverage-plugins-dir}/${eclipse-equinox-common-plugin}"/>
<pathelement location="${code-coverage-plugins-dir}/${llc-common-plugin}"/>
</path>
<!-- Generate baseline and probescript file for dynamic execution -->
<taskdef name="coode-coverage-app-annalyzer" classname="com.ibm.rational.llc.engine.instrumentation.anntask.CoverageApplicationAnalyzerTAsk" classpathref="lib.path"/>
<code-coverage-app-analyzer projectDir="${basedir}" probescript="${probescriptFile}" baseline="${baselineFile}"/>
</target>
Where,
- code-coverage-plugins-dir - the location of plug-in folder. For example: C:\Program Files (x86)\IBM\IBMIMShared\plugins llc-engine-plugin
- llc-engine-plugin - the LLC engine plug-in. For example: com.ibm.rational.llc.engine_<latest version>
- eclipse-jdt-core-plugin - the Eclipse JDT core plugin. For example: org.eclipse.jdt.core_<latest version>.jar
- eclipse-equinox-common-plugin - the Eclipse equinox plugin. For example: org.eclipse.equinox.common_<latest version>.jar
- llc-common-plugin - the LLC common plugin. For example: com.ibm.rational.llc.common_<latest version>.jar
The input and output parameters used by this task are
described in the following table:
| Parameter | Description |
|---|---|
| projectDir | [Input] The input location of the project about
which you want to generate statistics. This input path might be a
WAR file, JAR file, or directory. If a directory is supplied, the
task (recursively) analyzes all the class, WAR and JAR files in the
directory. Note: You can optionally filter the files about which
statistics are generated by using the fileset attribute. In the following
example, statistics will only be generated for .jar files:
|
| probescript | [Output] The output location destination of the probescript file. Typically, the output location is within the basedir and is saved to a file with extension ".probescript." |
| baseline | [Output] The output location destination of the baseline file. Typically, the output location is within the basedir and is saved to a file with extension ".baseline." |