org.apache.cactus.integration.ant
Class CactusTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
              extended by org.apache.cactus.integration.ant.CactusTask

public class CactusTask
extends org.apache.tools.ant.taskdefs.optional.junit.JUnitTask

An Ant task that extends the optional JUnit task to provide support for in-container testing.

Version:
$Id: CactusTask.java 239202 2005-08-11 18:48:07Z felipeal $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.ForkMode, org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.SummaryAttribute
 
Field Summary
 
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
CactusTask()
          Constructor.
 
Method Summary
 void addConfiguredCactusproperty(PropertySet thePropertySet)
          Adds a set of properties that will be used as system properties either on the client side or on the server side.
 void addConfiguredSysproperty(org.apache.tools.ant.types.Environment.Variable theProperty)
          Called by Ant when the Variable object has been properly initialized.
 void addContainerSet(ContainerSet theContainerSet)
          Adds the nested containers element (only one is permitted).
 void addSysproperty(org.apache.tools.ant.types.Environment.Variable theProperty)
          Adds a system property to both client side and server side JVMs.
 org.apache.tools.ant.types.Path createContainerClasspath()
          Adds container classpath to the classpath that will be used for starting the container.
 void execute()
          
 void init()
           
 void setEarFile(java.io.File theEarFile)
          Sets the enterprise application archive that will be tested.
 void setWarFile(java.io.File theWarFile)
          Sets the web application archive that will be tested.
 
Methods inherited from class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
actOnTestResult, addAssertions, addClasspathEntry, addEnv, addFormatter, addSyspropertyset, addTest, allTests, createBatchTest, createBootclasspath, createClasspath, createJvmarg, createPermissions, createWatchdog, execute, execute, executeOrQueue, getCommandline, getDefaultOutput, getIndividualTests, getOutput, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, setDir, setErrorProperty, setFailureProperty, setFiltertrace, setFork, setForkMode, setHaltonerror, setHaltonfailure, setIncludeantruntime, setJvm, setMaxmemory, setNewenvironment, setPrintsummary, setReloading, setShowOutput, setTempdir, setTimeout
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, 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
 

Constructor Detail

CactusTask

public CactusTask()
           throws java.lang.Exception
Constructor.

Throws:
java.lang.Exception - If the constructor of JUnitTask throws an exception
Method Detail

init

public void init()
Overrides:
init in class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
See Also:
Task.init()

execute

public void execute()
             throws org.apache.tools.ant.BuildException

Overrides:
execute in class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
Throws:
org.apache.tools.ant.BuildException
See Also:
Task.execute()

addContainerSet

public final void addContainerSet(ContainerSet theContainerSet)
Adds the nested containers element (only one is permitted).

Parameters:
theContainerSet - The nested element to add

setEarFile

public final void setEarFile(java.io.File theEarFile)
Sets the enterprise application archive that will be tested. It must already contain the test-cases and the required libraries as a web module.

Parameters:
theEarFile - The EAR file to set

setWarFile

public final void setWarFile(java.io.File theWarFile)
Sets the web application archive that will be tested. It must already contain the test-cases and the required libraries.

Parameters:
theWarFile - The WAR file to set

addSysproperty

public void addSysproperty(org.apache.tools.ant.types.Environment.Variable theProperty)
Adds a system property to both client side and server side JVMs.

Overrides:
addSysproperty in class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
See Also:
JUnitTask.addSysproperty(Environment.Variable)

addConfiguredSysproperty

public void addConfiguredSysproperty(org.apache.tools.ant.types.Environment.Variable theProperty)
Called by Ant when the Variable object has been properly initialized.

Overrides:
addConfiguredSysproperty in class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
Parameters:
theProperty - the system property to set

addConfiguredCactusproperty

public void addConfiguredCactusproperty(PropertySet thePropertySet)
Adds a set of properties that will be used as system properties either on the client side or on the server side.

Parameters:
thePropertySet - the set of properties to be added

createContainerClasspath

public org.apache.tools.ant.types.Path createContainerClasspath()
Adds container classpath to the classpath that will be used for starting the container.

Returns:
reference to the classpath
Since:
Cactus 1.6


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.