| org.netbeans.junit.NbTestSuite
All known Subclasses: org.netbeans.junit.MultiTestSuite,
NbTestSuite | public class NbTestSuite extends TestSuite implements NbTest(Code) | | NetBeans extension to JUnit's TestSuite class.
|
Method Summary | |
public void | addTest(Test test) Adds a test to the suite. | public void | addTestSuite(Class testClass) | public boolean | canRun() Checks if a test isn't filtered out by the active filter. | public String | getExpectedFail() | public static NbTestSuite | linearSpeedSuite(Class clazz, int slowness, int repeat) Factory method to create a special execution suite that not only
executes the tests but also measures the times each execution took. | public void | setFilter(Filter filter) Sets active filter. | public static NbTestSuite | speedSuite(Class clazz, int slowness, int repeat) Factory method to create a special execution suite that not only
executes the tests but also measures the times each execution took. |
NbTestSuite | public NbTestSuite()(Code) | | Constructs an empty TestSuite.
|
NbTestSuite | public NbTestSuite(Class theClass)(Code) | | Constructs a TestSuite from the given class. Adds all the methods
starting with "test" as test cases to the suite.
|
NbTestSuite | public NbTestSuite(String name)(Code) | | Constructs an empty TestSuite.
|
addTest | public void addTest(Test test)(Code) | | Adds a test to the suite.
|
addTestSuite | public void addTestSuite(Class testClass)(Code) | | adds a test suite to this test suite
|
canRun | public boolean canRun()(Code) | | Checks if a test isn't filtered out by the active filter.
|
linearSpeedSuite | public static NbTestSuite linearSpeedSuite(Class clazz, int slowness, int repeat)(Code) | | Factory method to create a special execution suite that not only
executes the tests but also measures the times each execution took.
It then compares the times devided by the size of query
and fails if the difference is too big.
Test tests can be executed more times to eliminate the effect
of GC and hotspot compiler.
Parameters: clazz - the class to create tests for (from methods starting with test) Parameters: slowness - this must be true: slowness * min < max Parameters: repeat - number of times to repeat the test |
setFilter | public void setFilter(Filter filter)(Code) | | Sets active filter.
Parameters: filter - Filter to be set as active for current test, null will reset filtering. |
speedSuite | public static NbTestSuite speedSuite(Class clazz, int slowness, int repeat)(Code) | | Factory method to create a special execution suite that not only
executes the tests but also measures the times each execution took.
It then compares the times and fails if the difference is too big.
Test tests can be executed more times to eliminate the effect
of GC and hotspot compiler.
Parameters: clazz - the class to create tests for (from methods starting with test) Parameters: slowness - this must be true: slowness * min < max Parameters: repeat - number of times to repeat the test |
|
|