public class Suite<T extends Suite>
extends junit.framework.TestSuite
| Modifier and Type | Field and Description |
|---|---|
static String |
GOSU_SUITE_INCLUDE_TYPES |
static String |
SPLIT_PARTITION |
| Constructor and Description |
|---|
Suite() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
beforeSuite() |
int |
countTestCases() |
protected List<IDirectory> |
createDefaultGosuClassSearchPath() |
protected List<IDirectory> |
createDefaultJavaClassSearchPath() |
TestEnvironment |
getTestEnvironment() |
boolean |
isLoggingErrors() |
T |
javaAssertionsNotEnabled()
Used to indicate that this suite does not require assertions be enabled.
|
void |
logError(String o) |
T |
logErrors() |
org.junit.runner.Result |
run()
Runs this Suite with a TextListener tied to System.out and returns the result.
|
void |
run(junit.framework.TestResult result) |
boolean |
runViaStaticSuiteMethod()
A convenience method for running this suite from a main method.
|
junit.framework.Test |
testAt(int index) |
int |
testCount() |
Enumeration<junit.framework.Test> |
tests() |
List<junit.framework.Test> |
testsAsList() |
List<junit.framework.TestSuite> |
testsAsListOfSuites() |
T |
withClasspathEntry(File srcDir) |
T |
withIFileFilter(Predicate<IFile> fileFilter)
Adds a file filter to this suite, allowing certain tests to be excluded.
|
T |
withModules(String... moduleNames)
This limits the gosu tests that are run to gosu tests that are located
within the specified module in a gsrc or gtest directory AND all and java
tests in the classpath that are not in a module.
|
T |
withPackageFilter(Predicate<String> fileFilter)
Adds a package filter to this suite, which allows you to exclude certain packages from consideration.
|
T |
withPackages(String... packagePrefixes)
Adds a package filter that will only accept packages that are subpackages of the strings
passed in.
|
T |
withTest(Class type,
String... methods)
Adds a test to this Suite.
|
T |
withTest(IType type,
String... methods)
Adds a test to this Suite.
|
T |
withTest(String type,
String... methods)
Adds a test to this Suite.
|
T |
withTestEnvironment(TestEnvironment testEnvironment) |
T |
withTestTypeFilter(Predicate<IType> filter)
Adds a type filter to this suite, allowing certain tests to be excluded.
|
T |
withTimeout(long seconds) |
public static final String GOSU_SUITE_INCLUDE_TYPES
public static final String SPLIT_PARTITION
public TestEnvironment getTestEnvironment()
public final T javaAssertionsNotEnabled()
public final T withTest(IType type, String... methods)
public final T withTest(String type, String... methods)
public final T withTest(Class type, String... methods)
public final T withTestTypeFilter(Predicate<IType> filter)
withIFileFilter(gw.util.Predicate)
or withPackageFilter(gw.util.Predicate) If
possible, it is advisable to use a file filter instead.public final T withIFileFilter(Predicate<IFile> fileFilter)
withPackageFilter(gw.util.Predicate) if you wish to more easily apply a package
filter of tests without dealing with ugly file paths. Package filters are just as fast as
file filters, both of which are much faster than test type filters.public final T withPackages(String... packagePrefixes)
public final T withPackageFilter(Predicate<String> fileFilter)
withPackages(String...) instead.public final T withTimeout(long seconds)
public T withTestEnvironment(TestEnvironment testEnvironment)
public final T logErrors()
public final T withModules(String... moduleNames)
moduleNames - public final int countTestCases()
countTestCases in interface junit.framework.TestcountTestCases in class junit.framework.TestSuitepublic final junit.framework.Test testAt(int index)
testAt in class junit.framework.TestSuitepublic final int testCount()
testCount in class junit.framework.TestSuitepublic final Enumeration<junit.framework.Test> tests()
tests in class junit.framework.TestSuiteprotected List<IDirectory> createDefaultGosuClassSearchPath()
protected List<IDirectory> createDefaultJavaClassSearchPath()
public void logError(String o)
public void run(junit.framework.TestResult result)
run in interface junit.framework.Testrun in class junit.framework.TestSuiteprotected void beforeSuite()
public final boolean runViaStaticSuiteMethod()
public static void main(String[] args) {
System.exit( new GosuSuite().runSuite() ? 0 : 1 );
}
public final org.junit.runner.Result run()
public List<junit.framework.Test> testsAsList()
public List<junit.framework.TestSuite> testsAsListOfSuites()
public boolean isLoggingErrors()
Copyright © 2016. All rights reserved.