|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.groboclown.junit.v1.RunJarTests
A new way to start JUnit tests. It searches each given Jar file for classes that have a method of the form:
public static Test suite()
Accepts arguments as thus:
net.groboclown.junit.v1.RunJarTests [options] jar1 [jar2 [jar3 ...] ]where options are:
{prefix}
.public static void run( junit.textui.TestRunner t, java.io.PrintStream w )or
public static void run( junit.textui.TestRunner t )If the runner wishes to quit with an exit code, it must handle that itself.
Restriction: must be compilable from JDK 1.1.
Inner Class Summary | |
private class |
RunJarTests.ClasspathIdentifier
|
Field Summary | |
private static String |
CLASS_EXTENSION
|
private static ExtensionFilenameFilter |
CLASS_FILTER
|
private RunJarTests.ClasspathIdentifier[] |
CP_ID_LIST
|
private Vector |
m_cpSearch
|
private Vector |
m_ignorePrefix
|
private PrintStream |
m_out
|
private String |
m_testRunner
|
private boolean |
m_wait
|
Constructor Summary | |
RunJarTests(String[] args)
Standard constructor. |
Method Summary | |
(package private) static void |
|
protected junit.framework.TestSuite |
createTestSuite(junit.framework.Test[] tests)
|
protected String |
filename2classname(String fullName,
String baseName)
Convert a relative file name into a class name. |
protected void |
findClasses(String cpElement,
Vector suiteList)
Discovers all Class files from the given CP element, and returns the valid ones' test suites. |
protected junit.framework.Test |
findTest(Class c)
Checks the class instance for the public static Test suite() method. |
protected boolean |
isIgnored(String className)
|
protected Class |
loadClass(String className,
String cpElement)
Discover the class element with the given class name, and the given ClassPath element. |
protected junit.framework.Test[] |
loadTests()
Loads the classes for all the known CP elements |
static void |
main(String[] args)
Called from the command line. |
protected void |
parseCommandLineArguments(String[] args)
Load up the internal options from the command line arguments. |
protected void |
runTestRunner(junit.framework.Test test)
|
void |
setOutput(PrintStream ps)
Sets the output for the TestRunner invoked (if it allows one). |
protected void |
showHelp(int exitCode)
|
void |
start()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
Field Detail |
private Vector m_cpSearch
private Vector m_ignorePrefix
private boolean m_wait
private String m_testRunner
private PrintStream m_out
private static final String CLASS_EXTENSION
private static final ExtensionFilenameFilter CLASS_FILTER
private final RunJarTests.ClasspathIdentifier[] CP_ID_LIST
Constructor Detail |
public RunJarTests(String[] args)
Method Detail |
public static void main(String[] args)
args
- the command line argumentsstatic void()
public void start()
public void setOutput(PrintStream ps)
protected junit.framework.Test[] loadTests()
protected void findClasses(String cpElement, Vector suiteList)
protected junit.framework.Test findTest(Class c)
protected void parseCommandLineArguments(String[] args)
protected void showHelp(int exitCode)
protected Class loadClass(String className, String cpElement)
protected String filename2classname(String fullName, String baseName)
protected junit.framework.TestSuite createTestSuite(junit.framework.Test[] tests)
protected boolean isIgnored(String className)
protected void runTestRunner(junit.framework.Test test)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |