|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jtiger.framework.FixturesRunnerMain
public final class FixturesRunnerMain
Provides an entry point into a test execution by using a main
method.
The main method creates a FixturesRunnerConfig
from the command line arguments then delegates to a
FixturesRunner
instance, which is created by a FixturesRunnerFactory
.
Field Summary | |
---|---|
static String |
ARG_CATEGORIES
A case-insensitive command line argument which should be followed by one or more arguments that represent the regular expressions of test case categories to execute. |
static String |
ARG_DEFINITION_CLASS
A case-insensitive command line argument which should be followed by one class name argument that represents the test definition class. |
static String |
ARG_FIXTURE_CLASSES
A case-insensitive command line argument which should be followed by one or more arguments that represent the class names of the test fixtures to execute. |
static String |
ARG_HALT_ON_FAILURE
A case-insensitive command line argument which should be followed by no arguments that represents that a test execution should discontinue if a failure is encountered. |
static String |
ARG_JUNIT
A case-insensitive command line argument which should be followed by no arguments that represents that a test execution will be of JUnit test cases. |
static String |
ARG_RESULT
A case-insensitive command line argument which should be followed by one argument that represents the class name of the test fixture result handler. |
static String |
ARG_RESULT_PARAMETERS
A case-insensitive command line argument which should be followed by one or more arguments that represent the parameters to be passed to the test fixture result handler. |
static String |
ARG_SUTD_CLASS
A case-insensitive command line argument which should be followed by one argument that represents the class name of the test fixture set up and tear down class. |
static int |
RC_HALTED_ON_FAILURE
The return code of the Java Virtual Machine if ARG_HALT_ON_FAILURE is used and a test case failure
occurs. |
static int |
RC_WRONG_USAGE
The return code of the Java Virtual Machine if the command line arguments are in an incorrect format. |
Method Summary | |
---|---|
static boolean |
isCorrectFormat(String... args)
Returns true if the given arguments can be used to execute main method
successfully, false otherwise. |
static void |
main(String... args)
Execute the test run with the given command line arguments. |
static void |
usage()
Prints usage information to the standard error stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ARG_FIXTURE_CLASSES
FixturesRunnerConfig.getFixtureClasses()
,
Constant Field Valuespublic static final String ARG_DEFINITION_CLASS
TestDefinition
, otherwise the default implementation is used.
FixturesRunnerConfig.getDefinitionClass()
,
Constant Field Valuespublic static final String ARG_SUTD_CLASS
SetUpTearDown
, otherwise the default implementation is used.
FixturesRunnerConfig.getSutdClass()
,
Constant Field Valuespublic static final String ARG_JUNIT
ARG_DEFINITION_CLASS
or ARG_SUTD_CLASS
arguments.
public static final String ARG_HALT_ON_FAILURE
false
will be used.
FixturesRunnerConfig.isHaltOnFailure()
,
Constant Field Valuespublic static final String ARG_CATEGORIES
FixturesRunnerConfig.getCategories()
,
Constant Field Valuespublic static final String ARG_RESULT
FixtureResultsHandler
, otherwise the default implementation is
used.
public static final String ARG_RESULT_PARAMETERS
public static final int RC_WRONG_USAGE
public static final int RC_HALTED_ON_FAILURE
ARG_HALT_ON_FAILURE
is used and a test case failure
occurs.
Method Detail |
---|
public static boolean isCorrectFormat(String... args) throws ClassNotFoundException
true
if the given arguments can be used to execute main method
successfully, false
otherwise.
args
- The arguments to test for a correct format for execution by the main method
.
true
if the given arguments can be used to execute main method
successfully, false
otherwise.
ClassNotFoundException
- If the passed class names in the command line arguments cannot be loaded.public static void main(String... args)
ARG_HALT_ON_FAILURE
has been set and a test
failure occurs. It is guaranteed that if isCorrectFormat(String[])
returns true
and if
ARG_HALT_ON_FAILURE
is not passed, that a forced JVM shut down will not occur.
Compile-time checked exceptions, which may be thrown during test execution, will be handled by outputting them to
the standard error stream.
args
- The arguments to execute the test run with.public static void usage()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |