|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.runner.BaseTestRunner
public abstract class BaseTestRunner
Base class for all test runners. This class was born live on stage in Sardinia during XP2000.
Field Summary | |
---|---|
static String |
SUITE_METHODNAME
|
Constructor Summary | |
---|---|
BaseTestRunner()
|
Method Summary | |
---|---|
void |
addError(Test test,
Throwable t)
An error occurred. |
void |
addFailure(Test test,
AssertionFailedError t)
A failure occurred. |
String |
elapsedTimeAsString(long runTime)
Returns the formatted string of the elapsed time. |
void |
endTest(Test test)
A test ended. |
String |
extractClassName(String className)
Extract the class name from a String in VA/Java style |
static String |
getFilteredTrace(String stack)
Filters stack frames from internal JUnit classes |
static String |
getFilteredTrace(Throwable t)
Returns a filtered stack trace |
static String |
getPreference(String key)
|
static int |
getPreference(String key,
int dflt)
|
Test |
getTest(String suiteClassName)
Returns the Test corresponding to the given suite. |
static void |
savePreferences()
|
void |
setLoading(boolean enable)
Sets the loading behaviour of the test runner |
static void |
setPreference(String key,
String value)
|
void |
startTest(Test test)
A test started. |
abstract void |
testEnded(String testName)
|
abstract void |
testFailed(int status,
Test test,
Throwable t)
|
abstract void |
testStarted(String testName)
|
static String |
truncate(String s)
Truncates a String to the maximum length. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SUITE_METHODNAME
Constructor Detail |
---|
public BaseTestRunner()
Method Detail |
---|
public void startTest(Test test)
TestListener
startTest
in interface TestListener
public static void savePreferences() throws IOException
IOException
public static void setPreference(String key, String value)
public void endTest(Test test)
TestListener
endTest
in interface TestListener
public void addError(Test test, Throwable t)
TestListener
addError
in interface TestListener
public void addFailure(Test test, AssertionFailedError t)
TestListener
addFailure
in interface TestListener
public abstract void testStarted(String testName)
public abstract void testEnded(String testName)
public abstract void testFailed(int status, Test test, Throwable t)
public Test getTest(String suiteClassName)
public String elapsedTimeAsString(long runTime)
public void setLoading(boolean enable)
public String extractClassName(String className)
public static String truncate(String s)
public static String getPreference(String key)
public static int getPreference(String key, int dflt)
public static String getFilteredTrace(Throwable t)
public static String getFilteredTrace(String stack)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |