Class BatchTest
java.lang.Object
org.apache.tools.ant.taskdefs.optional.junit.BaseTest
org.apache.tools.ant.taskdefs.optional.junit.BatchTest
Create then run JUnitTest's based on the list of files
given by the fileset attribute.
Every .java or .class file in the fileset is
assumed to be a testcase.
A JUnitTest is created for each of these named classes with
basic setup inherited from the parent BatchTest.
- See Also:
-
Field Summary
Fields inherited from class BaseTest
destDir, errorProperty, failureProperty, filtertrace, fork, formatters, haltOnError, haltOnFail, ifProperty, unlessProperty -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a new ResourceCollection instance to this batchtest.voidaddFileSet(FileSet fs) Add a new fileset instance to this batchtest.elements()Return allJUnitTestinstances obtain by applying the fileset rules.static StringjavaToClass(String filename) Convenient method to convert a pathname without extension to a fully qualified classname.Methods inherited from class BaseTest
addFormatter, getErrorProperty, getFailureProperty, getFiltertrace, getFork, getHaltonerror, getHaltonfailure, getIfCondition, getTodir, getUnlessCondition, isSkipNonTests, setErrorProperty, setFailureProperty, setFiltertrace, setFork, setHaltonerror, setHaltonfailure, setIf, setIf, setSkipNonTests, setTodir, setUnless, setUnlessModifier and TypeMethodDescriptionvoidaddFormatter(FormatterElement elem) Allow a formatter nested element.Get the failure property name.Get the failure property name.booleanGet the filtertrace attribute.booleangetFork()Get the fork attribute.booleanGet the haltonerror attribute.booleanGet the haltonfailure attribute.The if expressiongetTodir()Get the destination directory.The unless expressionbooleanvoidsetErrorProperty(String errorProperty) Set the name of the error property.voidsetFailureProperty(String failureProperty) Set the name of the failure property.voidsetFiltertrace(boolean value) Set the filtertrace attribute.voidsetFork(boolean value) Set the fork attribute.voidsetHaltonerror(boolean value) Set the haltonerror attribute.voidsetHaltonfailure(boolean value) Set the haltonfailure attribute.voidSet the if attribute.voidSet the if attribute.voidsetSkipNonTests(boolean skipNonTests) voidSets the destination directory.voidSet the unless attribute.voidSet the unless attribute.
-
Constructor Details
-
BatchTest
create a new batchtest instance- Parameters:
project- the project it depends on.
-
-
Method Details
-
addFileSet
Add a new fileset instance to this batchtest. Whatever the fileset is, only filename that are.javaor.classwill be considered as 'candidates'.- Parameters:
fs- the new fileset containing the rules to get the testcases.
-
add
Add a new ResourceCollection instance to this batchtest. Whatever the collection is, only names that are.javaor.classwill be considered as 'candidates'.- Parameters:
rc- the new ResourceCollection containing the rules to get the testcases.- Since:
- Ant 1.7
-
elements
Return allJUnitTestinstances obtain by applying the fileset rules.- Returns:
- an enumeration of all elements of this batchtest that are
a
JUnitTestinstance.
-
javaToClass
Convenient method to convert a pathname without extension to a fully qualified classname. For exampleorg/apache/Whateverwill be converted toorg.apache.Whatever- Parameters:
filename- the filename to "convert" to a classname.- Returns:
- the classname matching the filename.
-