|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.jtiger.ant.JTigerTask
public final class JTigerTask
An Apache Ant task for performing a test execution
run from an Ant build.
An example excerpt of an Ant build file that uses this task:
<target name="test" description="Execute JTiger tests"> <mkdir dir="test-report"/> <taskdef name="jtiger" classname="org.jtiger.ant.JTigerTask" classpathref="project.class.path"/> <jtiger haltonfailure="true"> <category regex="DatabaseTest"/> <fixtures> <fixture classname="com.foo.AdditionalTestFixture"/> <fileset dir="test-src"> <include name="**/*.java"/> </fileset> </fixtures> <result name="~html"> <param value="test-report"/> </result> <java> <classpath refid="project.class.path"/> </java> </jtiger> </target>
Category
,
Fixture
,
Fixtures
,
Java
,
Result
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 | |
---|---|
JTigerTask()
Create a default JTigerTask. |
Method Summary | |
---|---|
Category |
createCategory()
Creates a Category . |
Fixtures |
createFixtures()
Creates a Fixtures . |
Java |
createJava()
Creates a Java . |
Result |
createResult()
Creates a Result . |
void |
execute()
Executes the Ant task by calling Java.execute() and passing the set arguments to
FixturesRunnerMain.main(String[]) . |
void |
setDefinitionClass(String definitionClass)
Sets the test definition class name for this task. |
void |
setHaltOnFailure(boolean haltOnFailure)
Sets the halt on failure attribute for this task. |
void |
setJUnit(boolean jUnit)
Sets the junit attribute for this task. |
void |
setSutdClass(String sutdClass)
Sets the set up/tear down class name for this task. |
Methods inherited from class org.apache.tools.ant.Task |
---|
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, 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 |
---|
public JTigerTask()
Method Detail |
---|
public Fixtures createFixtures()
Fixtures
.
Fixtures
.public void setDefinitionClass(String definitionClass)
definitionClass
- The test definition class name for this task.FixturesRunnerConfig.getDefinitionClass()
,
TestDefinition
public void setSutdClass(String sutdClass)
sutdClass
- The set up/tear down class name for this task.FixturesRunnerConfig.getSutdClass()
,
SetUpTearDown
public Category createCategory()
Category
.
Category
.public void setHaltOnFailure(boolean haltOnFailure)
haltOnFailure
- The halt on failure attribute for this task.FixturesRunnerConfig.isHaltOnFailure()
public void setJUnit(boolean jUnit)
true
overrides any values set for setDefinitionClass(String)
and
setSutdClass(String)
.
Set this attribute to execute JUnit unit test cases.
jUnit
- The junit attribute for this task.public Result createResult()
Result
.
Result
.public Java createJava()
Java
.
Java
.public void execute() throws org.apache.tools.ant.BuildException
Java.execute()
and passing the set arguments to
FixturesRunnerMain.main(String[])
. These parameters are set by specifying attributes and elements in the
Ant build file.
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
- classname
attribute in the Ant build file.regex
attribute in the Ant build file.type
attribute in the Ant build file.destination
attribute in the Ant build file.destination
attribute that is an invalid value in the Ant
build file.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |