Base class for all test runners.
This class was born live on stage in Sardinia during XP2000.
clearStatus
protected void clearStatus()
Clears the status message.
elapsedTimeAsString
public String elapsedTimeAsString(long runTime)
Returns the formatted string of the elapsed time.
extractClassName
public String extractClassName(String className)
Extract the class name from a String in VA/Java style
getFilteredTrace
public static String getFilteredTrace(String stack)
Filters stack frames from internal JUnit classes
getFilteredTrace
public static String getFilteredTrace(Throwable t)
Returns a filtered stack trace
getPreference
public static String getPreference(String key)
getPreference
public static int getPreference(String key,
int dflt)
getPreferences
protected static Properties getPreferences()
getTest
public Test getTest(String suiteClassName)
Returns the Test corresponding to the given suite. This is
a template method, subclasses override runFailed(), clearStatus().
inVAJava
public static boolean inVAJava()
loadSuiteClass
protected Class loadSuiteClass(String suiteClassName)
throws ClassNotFoundException
Returns the loaded Class for a suite name.
processArguments
protected String processArguments(String[] args)
Processes the command line arguments and
returns the name of the suite class to run or null
runFailed
protected abstract void runFailed(String message)
Override to define how to handle a failed loading of
a test suite.
savePreferences
public static void savePreferences()
throws IOException
setLoading
public void setLoading(boolean enable)
Sets the loading behaviour of the test runner
setPreference
public void setPreference(String key,
String value)
setPreferences
protected static void setPreferences(Properties preferences)
showStackRaw
protected static boolean showStackRaw()
testEnded
public abstract void testEnded(String testName)
testFailed
public abstract void testFailed(int status,
Test test,
Throwable t)
testStarted
public abstract void testStarted(String testName)
truncate
public static String truncate(String s)
Truncates a String to the maximum length.
useReloadingTestSuiteLoader
protected boolean useReloadingTestSuiteLoader()