org.apache.cactus.integration.ant
Class CactusTestTask

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.CactusTestTask

public class CactusTestTask
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. This class is a refactor of CactusTask v.133 and RunContainerTask v.133 to use cargo

Since:
1.8
Version:
$Id: CactusTestTask.java 394301 2006-04-15 15:07:26Z 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
CactusTestTask()
          Constructor.
 
Method Summary
 void execute()
          
 void init()
           
 void setContextURL(java.lang.String theContextURL)
          Sets the context url that will be tested.
 void setEarFile(java.io.File theEarFile)
          Sets the enterprise application archive that will be tested.
 void setLogs(java.io.File theLogs)
          Sets the Logs.
 void setRunLocal(boolean theRunLocal)
          Sets the scope of the test.
 void setServerName(java.lang.String theServerName)
          Sets the server host that will be tested.
 void setServletPort(java.lang.String theServletPort)
          Sets the servlet port that will be tested.
 void setTimeout(long theTimeout)
           
 void setToDir(java.io.File theToDir)
          Sets the test report dir.
 void setupLogs()
          Set up the logs.
 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, addConfiguredSysproperty, addEnv, addFormatter, addSysproperty, 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

CactusTestTask

public CactusTestTask()
               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()

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

setServerName

public final void setServerName(java.lang.String theServerName)
Sets the server host that will be tested.

Parameters:
theServerName - The server host

setServletPort

public final void setServletPort(java.lang.String theServletPort)
Sets the servlet port that will be tested.

Parameters:
theServletPort - The servlet port

setContextURL

public final void setContextURL(java.lang.String theContextURL)
Sets the context url that will be tested.

Parameters:
theContextURL - The context url

setToDir

public final void setToDir(java.io.File theToDir)
Sets the test report dir.

Parameters:
theToDir - The test report to set

setRunLocal

public final void setRunLocal(boolean theRunLocal)
Sets the scope of the test.

Parameters:
theRunLocal - Run Local define

setLogs

public final void setLogs(java.io.File theLogs)
Sets the Logs.

Parameters:
theLogs - Different logs define

setTimeout

public void setTimeout(long theTimeout)
Parameters:
theTimeout - the timeout after which we stop trying to call the test URL.

setupLogs

public void setupLogs()
Set up the logs.



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