Ant Overview

Tasks available for this plugin:

TaskDescription
parasoft:cpptestC++Test execution task
parasoft:dottestdotTest execution task
parasoft:eclipseAnt task to generate eclipse project files
parasoft:jtestJtest execution task
parasoft:localsettingsAnt task to generate the local settings file
parasoft:monitorAnt task to monitor an ant build
parasoft:soatestSOAtest execution task
parasoft:verifyVerify task

System Requirements

The following specifies the minimum requirements to run this Ant plugin:

JDK1.5
Ant Version1.6.2

JAR File

The Ant plugin requires parasoft-ant-3.13.jar to be added in either your Ant library or Ant repository. Or its directory must be added as a command line -lib argument.

Importing Projects

The Parasoft Ant script imports the Ant build script of a project, and integrates that build with Parasoft Test Plugin. Specifically, the classpath of the project(s) are defined in one of the following ways:

javacref ValueDescription
javacIdThe ID of the javac task from the original Ant build script.
javacId, javacId2, javacId3, ...The ID's of the javac tasks. Multiple javac targets can be listed using commas, and will be merged as one project.
allAll javac tasks.
allrefsAll javac tasks with an ID attribute.

Usage

Jtest Example Ant script

In the example below, the Parasoft Ant script imports an existing build.xml and calls Jtest to execute a Static Analysis configuration on the build.

<!-- Project definition and call to Parasoft Ant library -->
<project name="Parasoft Test Build" default="parasoft-test" xmlns:parasoft="antlib:com.parasoft.antlib">
    <!-- To import the original Ant build.xml file and specify the task to integrate to -->
    <import file="build.xml"/>
    <target name="parasoft-test" depends="build">
        <!-- To run Jtest on the specified project directory in projectDescription, using the configuration in config and Jtest in jtestHome -->
        <parasoft:jtest config="builtin://Static Analysis" jtestHome="C:\Program Files\Parasoft\Jtest\9.5">
            <projectDescription basedir="."/>
        </parasoft:jtest>
    </target>
</project>

SOAtest Example Ant script

In the example below, the Parasoft Ant script calls SOAtest on the tst files in the project. Unlike in the Jtest example above, there are no source files needed to compile and no build files to import.

<!-- Project definition and call to Parasoft Ant library -->
<project name="SOAtest Test Build" default="soatest-test" xmlns:parasoft="antlib:com.parasoft.antlib">
    <target name="soatest-test">
        <!-- To generate .project file needed to run SOAtest if it does not exist -->
        <parasoft:eclipse/>
        <!-- To run SOAtest with the selected configuration -->
        <parasoft:soatest config="builtin://Run Web Functional Tests in Browser Specified by Test" soatestHome="C:\Program Files\Parasoft\SOAtest\9.4"/>
    </target>
</project>