net.dpml.tools.tasks
Class JUnitTestTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by net.dpml.tools.tasks.GenericTask
              extended by net.dpml.tools.tasks.JUnitTestTask

public class JUnitTestTask
extends GenericTask

JUnit test execution.

Version:
1.1.3
Author:
Digital Product Meta Library

Field Summary
static String ABORT_ON_ERROR_KEY
          Constant test abort on error key - if true (the default) the build will fail if a test error occurs.
static String ABORT_ON_FAILURE_KEY
          Constant test abort on failure key - if true (the default) the build will fail if a test failure occurs.
static String CACHE_PATH_KEY
          Constant cache path key.
static String DEBUG_KEY
          Constant test debug key.
static String FORK_KEY
          Constant test fork key.
static String HALT_ON_ERROR_KEY
          Constant test halt-on-error key (default is false).
static String HALT_ON_FAILURE_KEY
          Constant test halt-on-failure key (default is false).
static String MX_KEY
          Constant for lookup of mx value.
static String TEST_ENABLED_KEY
          Constant test enabled key.
static String TEST_ENV_KEY
          Constant test env directory key.
static String TEST_EXCLUDES_KEY
          the key for the exclude pattern for test cases
static String TEST_EXCLUDES_VALUE
          default value
static String TEST_FORK_MODE_KEY
          Constant test fork mode key.
static String TEST_INCLUDES_KEY
          the key for the include pattern for test cases
static String TEST_INCLUDES_VALUE
          default value
static String TEST_SRC_KEY
          Constant test src directory key.
static String VERBOSE_KEY
          the key for the exclude pattern for test cases
static String WORK_DIR_KEY
          Constant work dir key.
 
Fields inherited from class net.dpml.tools.tasks.GenericTask
ASC_EXT, GPG_EXE_KEY, MD5_EXT
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
JUnitTestTask()
           
 
Method Summary
 void execute()
          Task execution.
 void init()
          Task initialization.
 void setClasspath(Path path)
          Set the classpath.
 void setClasspathRef(String id)
          Set the id of the compilation classpath.
 void setSrc(File source)
          Set the directory containing the unit test source files.
 
Methods inherited from class net.dpml.tools.tasks.GenericTask
asc, checksum, copy, deleteDir, getContext, getLibrary, getResource, isInitialized, mkDir
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MX_KEY

public static final String MX_KEY
Constant for lookup of mx value.

See Also:
Constant Field Values

TEST_ENABLED_KEY

public static final String TEST_ENABLED_KEY
Constant test enabled key.

See Also:
Constant Field Values

TEST_SRC_KEY

public static final String TEST_SRC_KEY
Constant test src directory key.

See Also:
Constant Field Values

TEST_ENV_KEY

public static final String TEST_ENV_KEY
Constant test env directory key.

See Also:
Constant Field Values

DEBUG_KEY

public static final String DEBUG_KEY
Constant test debug key.

See Also:
Constant Field Values

FORK_KEY

public static final String FORK_KEY
Constant test fork key.

See Also:
Constant Field Values

TEST_FORK_MODE_KEY

public static final String TEST_FORK_MODE_KEY
Constant test fork mode key.

See Also:
Constant Field Values

HALT_ON_ERROR_KEY

public static final String HALT_ON_ERROR_KEY
Constant test halt-on-error key (default is false).

See Also:
Constant Field Values

HALT_ON_FAILURE_KEY

public static final String HALT_ON_FAILURE_KEY
Constant test halt-on-failure key (default is false).

See Also:
Constant Field Values

ABORT_ON_ERROR_KEY

public static final String ABORT_ON_ERROR_KEY
Constant test abort on error key - if true (the default) the build will fail if a test error occurs.

See Also:
Constant Field Values

ABORT_ON_FAILURE_KEY

public static final String ABORT_ON_FAILURE_KEY
Constant test abort on failure key - if true (the default) the build will fail if a test failure occurs.

See Also:
Constant Field Values

CACHE_PATH_KEY

public static final String CACHE_PATH_KEY
Constant cache path key.

See Also:
Constant Field Values

WORK_DIR_KEY

public static final String WORK_DIR_KEY
Constant work dir key.

See Also:
Constant Field Values

TEST_INCLUDES_KEY

public static final String TEST_INCLUDES_KEY
the key for the include pattern for test cases

See Also:
Constant Field Values

TEST_INCLUDES_VALUE

public static final String TEST_INCLUDES_VALUE
default value

See Also:
Constant Field Values

TEST_EXCLUDES_KEY

public static final String TEST_EXCLUDES_KEY
the key for the exclude pattern for test cases

See Also:
Constant Field Values

TEST_EXCLUDES_VALUE

public static final String TEST_EXCLUDES_VALUE
default value

See Also:
Constant Field Values

VERBOSE_KEY

public static final String VERBOSE_KEY
the key for the exclude pattern for test cases

See Also:
Constant Field Values
Constructor Detail

JUnitTestTask

public JUnitTestTask()
Method Detail

init

public void init()
          throws BuildException
Task initialization.

Overrides:
init in class GenericTask
Throws:
BuildException - if a build error occurs.

setClasspathRef

public void setClasspathRef(String id)
Set the id of the compilation classpath.

Parameters:
id - the classpath reference

setClasspath

public void setClasspath(Path path)
Set the classpath.

Parameters:
path - the classpath

setSrc

public void setSrc(File source)
Set the directory containing the unit test source files.

Parameters:
source - the test source directory

execute

public void execute()
             throws BuildException
Task execution.

Overrides:
execute in class Task
Throws:
BuildException - if a build error occurs.