Class RandomTestFinder
java.lang.Object
com.sun.javatest.TestFinder
com.sun.javatest.finder.RandomTestFinder
A test finder that reads tests from a delegate, and returns the
results in the random order. This is primarily for debugging
and testing purposes.
-
Nested Class Summary
Nested classes/interfaces inherited from class TestFinder
TestFinder.ErrorHandler, TestFinder.Fault -
Field Summary
Fields inherited from class TestFinder
debug, env -
Constructor Summary
ConstructorsConstructorDescriptionRandomTestFinder(TestFinder delegate) Constructor to create RandomTestFinder object when the original TestFinder instance is already created and initialized. -
Method Summary
Modifier and TypeMethodDescriptionFile[]getFiles()Get the files that were found by the most recent call of read.getRoot()Get the root file of the test suite, as passed in to theinitmethod.Get the root directory of the test suite; this is either the root passed in to the init method or if that is a file, it is the directory containing the file.getTests()Get the test descriptions that were found by the most recent call of read.voidRead a file, looking for test descriptions and other files that might need to be read.protected voidScan a file, looking for test descriptions and other files that might need to be scanned.Methods inherited from class TestFinder
clearErrors, decodeAllArgs, decodeArg, error, error, error, foundFile, foundTestDescription, foundTestDescription, getComparator, getDefaultComparator, getErrorCount, getErrorHandler, getErrors, init, init, isFolder, lastModified, localizedError, normalize, processEntry, setComparator, setErrorHandler, setRoot, totalNumberOfTestsInTheSuite
-
Constructor Details
-
RandomTestFinder
Constructor to create RandomTestFinder object when the original TestFinder instance is already created and initialized. Finders created with this constructor do not require the init() method to be invoked.- Parameters:
delegate- - the real test finder object.
-
-
Method Details
-
getRoot
Description copied from class:TestFinderGet the root file of the test suite, as passed in to theinitmethod.- Overrides:
getRootin classTestFinder- Returns:
- the root file of the test suite
- See Also:
-
getRootDir
Description copied from class:TestFinderGet the root directory of the test suite; this is either the root passed in to the init method or if that is a file, it is the directory containing the file.- Overrides:
getRootDirin classTestFinder- Returns:
- the root directory of the test suite
-
read
Description copied from class:TestFinderRead a file, looking for test descriptions and other files that might need to be read. If the file is relative, it will be evaluated relative to getRootDir. Depending on the test finder, the file may be either a plain file or a directory.- Overrides:
readin classTestFinder- Parameters:
file- The file to be read.
-
getTests
Description copied from class:TestFinderGet the test descriptions that were found by the most recent call of read.- Overrides:
getTestsin classTestFinder- Returns:
- the test descriptions that were found by the most recent call of read.
- See Also:
-
getFiles
Description copied from class:TestFinderGet the files that were found by the most recent call of read.- Overrides:
getFilesin classTestFinder- Returns:
- the files that were found by the most recent call of read.
- See Also:
-
scan
Description copied from class:TestFinderScan a file, looking for test descriptions and other files that might need to be scanned. The implementation depends on the type of test finder.- Specified by:
scanin classTestFinder- Parameters:
file- The file to scan
-