|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.TestSuite
com.gargoylesoftware.base.testing.RecursiveTestSuite
public class RecursiveTestSuite
A launching point for executing test cases. This recusively walks through the directory structure looking for classes that end in Test.class. It then loads these classes to see if they are instances of TestCase. If so, they are added to the test suite. Once all directories have been scanned, the test cases are executed.
Field Summary | |
---|---|
private TestFilter |
testFilter_
|
Constructor Summary | |
---|---|
RecursiveTestSuite(java.io.File startingPath,
TestFilter testFilter)
Create an instance |
|
RecursiveTestSuite(java.lang.String startingPath,
TestFilter testFilter)
Create a new instance |
Method Summary | |
---|---|
private java.util.Set |
findAllTestClasses(java.io.File startingDirectory)
|
private void |
findAllTestClasses(java.io.File directory,
java.util.List list)
|
private junit.framework.Test |
getTestForClass(java.lang.Class clazz)
Return a test suite containing all the tests for the specified class. |
static void |
main(java.lang.String[] args)
Main entry point. |
void |
testFoo()
Dummy test so that JUnit doesn't complain that this suite doesn't have any tests. |
Methods inherited from class junit.framework.TestSuite |
---|
addTest, addTestSuite, countTestCases, createTest, getName, getTestConstructor, run, runTest, setName, testAt, testCount, tests, toString, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final TestFilter testFilter_
Constructor Detail |
---|
public RecursiveTestSuite(java.lang.String startingPath, TestFilter testFilter) throws java.io.IOException
testFilter
- The object that will filter out tests that we don't
wish to runstartingPath
- The directory that we will start our descent in.
java.io.IOException
- If anything goes wrong during the directory
scanning.public RecursiveTestSuite(java.io.File startingPath, TestFilter testFilter) throws java.io.IOException
testFilter
- The object that will filter out tests that we don't
wish to runstartingPath
- The directory that we will start our descent in.
java.io.IOException
- If anything goes wrong during the directory
scanning.Method Detail |
---|
public static void main(java.lang.String[] args)
args
- The argumentspublic void testFoo()
private junit.framework.Test getTestForClass(java.lang.Class clazz)
clazz
- Description of Parameter
private java.util.Set findAllTestClasses(java.io.File startingDirectory) throws java.io.IOException
startingDirectory
- Description of Parameter
java.io.IOException
- Description of Exceptionprivate void findAllTestClasses(java.io.File directory, java.util.List list) throws java.io.IOException
directory
- Description of Parameterlist
- Description of Parameter
java.io.IOException
- Description of Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |