|
||||||||||
| 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
de.berlios.jsunit.ant.JsUnitTask
An Ant task for JsUnit. The task allows the execution of JavaScript unit tests and creates XML reports, that can be processed by the Ant junitreport task. Define the task as follows:
<taskdef name="jsunit" className="de.berlios.jsunit.ant.JsUnitTask" />
<jsunit dir="sourceDir">
<source file="money/IMoney.js" />
<testsuite name="MyTestSuite" todir="build/test-reports" type="TESTSUITES">
<fileset dir=".">
<include name="* /**Test.js" />
</fileset>
</testsuite>
</jsunit>
You may declare multiple source tags, the scripts are loaded into the declared
order. You may also declare multiple testsuite sections, each one will
generate a separate XML report. The type of the test suite can be one of the following
values:
| Nested Class Summary | |
class |
JsUnitTask.SourceFile
A utility bean for a SourceFile. |
| 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 | |
JsUnitTask()
|
|
| Method Summary | |
JsUnitTask.SourceFile |
createSource()
Creates a new source. |
JsUnitSuite |
createTestSuite()
Creates a new test suite. |
void |
execute()
|
boolean |
isHaltOnError()
Requests the haltOnError flag. |
boolean |
isHaltOnFailure()
Requests the haltOnFailure flag. |
void |
setDir(java.io.File dir)
Sets the source directory. |
void |
setHaltOnError(boolean haltOnError)
Sets haltOnError flag. |
void |
setHaltOnFailure(boolean haltOnFailure)
Sets haltOnFailure flag. |
| 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 JsUnitTask()
| Method Detail |
public void execute()
throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildExceptionpublic void setDir(java.io.File dir)
dir - the directory.public boolean isHaltOnError()
true if setpublic void setHaltOnError(boolean haltOnError)
haltOnError - the valuepublic boolean isHaltOnFailure()
true if setpublic void setHaltOnFailure(boolean haltOnFailure)
haltOnFailure - the valuepublic JsUnitSuite createTestSuite()
public JsUnitTask.SourceFile createSource()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||