public class ComponentTestSuite extends TestSuite implements IAbortableTestSuite
| Modifier and Type | Field and Description |
|---|---|
boolean |
aborted
Indicate when the suite is aborted due to excessive run time.
|
protected java.lang.ClassLoader |
classloader
The class loader.
|
static java.lang.String[] |
DEFARGS
The default test platform arguments.
|
protected IExternalAccess |
platform
The platform.
|
protected long |
timeout
The timeout (if any).
|
protected java.util.Timer |
timer
The timeout timer (if any).
|
| Constructor and Description |
|---|
ComponentTestSuite(java.io.File[][] roots,
java.lang.String[] tests,
java.lang.String[] excludes)
Create a component test suite for components contained in a given path.
|
ComponentTestSuite(java.io.File[][] roots,
java.lang.String[] tests,
java.lang.String[] excludes,
boolean test,
boolean load,
boolean start)
Create a component test suite for components contained in a given path.
|
ComponentTestSuite(java.lang.String[] excludes)
Create a component test suite for components contained in class directories on the class path (i.e.
|
ComponentTestSuite(java.lang.String[] args,
java.io.File[][] roots,
java.lang.String[] tests,
java.lang.String[] excludes,
boolean runtests,
boolean load,
boolean start)
Create a component test suite for components contained in a given path.
|
ComponentTestSuite(java.lang.String projectDir,
java.lang.String[] excludes)
Create a component test suite for components contained in a given path.
|
ComponentTestSuite(java.lang.String projectDir,
java.lang.String[] tests,
java.lang.String[] excludes)
Create a component test suite for components contained in a given path.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanup(TestResult result)
Called after test suite is finished.
|
static void |
clearAWT()
Workaround for AWT/Swing memory leaks.
|
protected static void |
collectClasspathDirectories(java.lang.ClassLoader classloader,
java.util.Set<java.io.File> set)
Collect all directory URLs belonging to a class loader.
|
static java.io.File[][] |
findClassDirectories()
Find class directories on classpath.
|
protected java.util.List<java.lang.String> |
getAllFiles(java.io.File root) |
java.lang.ClassLoader |
getClassLoader()
Get the class loader.
|
boolean |
isAborted()
Indicate when the suite is aborted due to excessive run time.
|
void |
run(TestResult result)
Overridden for pre and post code.
|
protected void |
startTimer() |
protected void |
stopTimer() |
public static final java.lang.String[] DEFARGS
public boolean aborted
protected IExternalAccess platform
protected java.lang.ClassLoader classloader
protected long timeout
protected java.util.Timer timer
public ComponentTestSuite(java.lang.String[] excludes)
throws java.lang.Exception
excludes - Files to exclude (if a pattern is contained in file path).java.lang.Exceptionpublic ComponentTestSuite(java.lang.String projectDir,
java.lang.String[] excludes)
throws java.lang.Exception
projectDir - The project directory.excludes - Files to exclude (if a pattern is contained in file path).java.lang.Exceptionpublic ComponentTestSuite(java.lang.String projectDir,
java.lang.String[] tests,
java.lang.String[] excludes)
throws java.lang.Exception
projectDir - The project directory.tests - The tests (full qualified names) to include. Includes all, if null.excludes - Files to exclude (if a pattern is contained in file path).java.lang.Exceptionpublic ComponentTestSuite(java.io.File[][] roots,
java.lang.String[] tests,
java.lang.String[] excludes)
throws java.lang.Exception
roots - The paths to search for testcases in and to load classes from.tests - The tests (full qualified names) to include. Includes all, if null.excludes - Files to exclude (if a pattern is contained in file path).java.lang.Exceptionpublic ComponentTestSuite(java.io.File[][] roots,
java.lang.String[] tests,
java.lang.String[] excludes,
boolean test,
boolean load,
boolean start)
throws java.lang.Exception
roots - The paths to search for testcases in and to load classes from.tests - The tests (full qualified names) to include. Includes all, if null.excludes - Files to exclude (if a pattern is contained in file path).test - Run test components.load - Include broken components (will cause test failure if any). Also shows loadable, but not startable components as succeeded tests.start - Try starting components, which are no test cases.java.lang.Exceptionpublic ComponentTestSuite(java.lang.String[] args,
java.io.File[][] roots,
java.lang.String[] tests,
java.lang.String[] excludes,
boolean runtests,
boolean load,
boolean start)
throws java.lang.Exception
args - The platform arguments.roots - The paths to search for testcases in and to load classes from.
Grouped by project, e.g. proj1/build/classes and proj1/build/resources
should be both at index [0] of this array.tests - The tests (full qualified names) to include. Includes all, if null.excludes - Files to exclude (if a pattern is contained in file path).runtests - Run test components.load - Include broken components (will cause test failure if any).start - Try starting components, which are no test cases.java.lang.Exceptionprotected void startTimer()
protected void stopTimer()
protected java.util.List<java.lang.String> getAllFiles(java.io.File root)
public boolean isAborted()
isAborted in interface IAbortableTestSuitepublic void run(TestResult result)
protected void cleanup(TestResult result)
public static void clearAWT()
public java.lang.ClassLoader getClassLoader()
public static java.io.File[][] findClassDirectories()
protected static void collectClasspathDirectories(java.lang.ClassLoader classloader,
java.util.Set<java.io.File> set)