|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.microedition.midlet.MIDlet mome.MoMIDlet mome.MoXMIDlet momeunit.runner.MIDletTestRunner
public class MIDletTestRunner
MIDletTestRunner is a fully configurable MIDlet. It is intended to run tests
in emulator (e.g. WTK emulator) or mobile device. It shows the results of
tests run (progress bar, statistics, lists of failures or errors with
detailed messages) in one screen. The tests can be run automatically during
start-up (depends on configuration) and re executed more times later. It can
print descriptive messages of failures and errors thrown together with
stack-trace to the standard error output. It can also stop tests execution,
when duration of their run (measured from first test start) exceeds specified
timeout. You can find more details at
package description
.
Note: It is built upon MoMELib library. This is a J2ME library that offers possibilities to execute commands in separate from AMS (Application Management Software) callback thread, issue commands programmatically, associate key (game action) or sequence of keys and/or game actions with command, use any complimentary argument with command and much more. If you are interested, visit MoMELib Home Page
Field Summary | |
---|---|
static String |
AUTO_START_PROPERTY
Autostart property name. |
static String |
BGCOLOR_PROPERTY
Background color property name. |
static String |
DEFAULT_SUITE_NAME
Global test suite default name. |
static String |
ERROR_COLOR_PROPERTY
Error color property name. |
static String |
FAILURE_COLOR_PROPERTY
Failure color property name. |
static String |
FGCOLOR_PROPERTY
Foreground color property name. |
static String |
FONT_PROPERTY
Font property name. |
static String |
OK_COLOR_PROPERTY
Ok color property name. |
static String |
PRINT2STDERR_PROPERTY
Print test events flag property name. |
static String |
PRINTSTACKTRACE_PROPERTY
Print stack-trace flag property name. |
static String |
SELECTED_BGCOLOR_PROPERTY
Selected item background color property name. |
static String |
SELECTED_FGCOLOR_PROPERTY
Selected item foreground color property name. |
static String |
STATISTICS_FONT_PROPERTY
Statistics font property name. |
static String |
TEST_PROPERTY_PREFIX
Test suite description property prefix. |
static String |
TESTS_PROPERTY
Global test suite description property name. |
static String |
TESTSNAME_PROPERTY
Global test suite name property name. |
static String |
TIMEOUT_PROPERTY
Timeout property name. |
Fields inherited from class mome.MoXMIDlet |
---|
ITEM_STATE_CHANGED |
Constructor Summary | |
---|---|
MIDletTestRunner()
|
Method Summary | |
---|---|
protected void |
initApp()
Generates global test suite, instantiates test screen canvas. |
protected void |
setTimeOut()
|
protected void |
startApp()
Makes the test screen current and starts tests execution if autostart flag is true . |
void |
xCommandAction(Object cmd,
Object src)
Indicates that a command event has occurred. |
Methods inherited from class mome.MoXMIDlet |
---|
commandAction, commandAction, destroyApp, getExecutor, itemStateChanged, pauseApp, pushCommand, setCommandEventsHeapSize, startExecutor, stopExecutor |
Methods inherited from class mome.MoMIDlet |
---|
exit, getDisplay, isInitialized |
Methods inherited from class javax.microedition.midlet.MIDlet |
---|
checkPermission, getAppProperty, notifyDestroyed, notifyPaused, platformRequest, resumeRequest |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SELECTED_FGCOLOR_PROPERTY
public static final String SELECTED_BGCOLOR_PROPERTY
public static final String ERROR_COLOR_PROPERTY
public static final String FAILURE_COLOR_PROPERTY
public static final String OK_COLOR_PROPERTY
public static final String FGCOLOR_PROPERTY
public static final String BGCOLOR_PROPERTY
public static final String FONT_PROPERTY
public static final String STATISTICS_FONT_PROPERTY
public static final String AUTO_START_PROPERTY
public static final String TIMEOUT_PROPERTY
public static final String PRINTSTACKTRACE_PROPERTY
public static final String PRINT2STDERR_PROPERTY
public static final String TEST_PROPERTY_PREFIX
public static final String TESTS_PROPERTY
public static final String TESTSNAME_PROPERTY
public static final String DEFAULT_SUITE_NAME
Constructor Detail |
---|
public MIDletTestRunner()
Method Detail |
---|
protected void initApp() throws MIDletStateChangeException
initApp
in class MoXMIDlet
MIDletStateChangeException
- is thrown if the MIDlet cannot start now but might be able to
start at a later time.MoXMIDlet.initApp()
protected void setTimeOut()
protected void startApp() throws MIDletStateChangeException
autostart
flag is true
.
startApp
in class MoXMIDlet
MIDletStateChangeException
MoXMIDlet.startApp()
public void xCommandAction(Object cmd, Object src)
MoXMIDlet
xCommandAction
in interface XCommandListener
xCommandAction
in class MoXMIDlet
cmd
- An object identifying the command. This can be any object.
Implementation should test on specific command by identity not
equality.src
- An object on which this event has occurred. Either Displayable or
Item or can be used as parameter for any user command.XCommandListener.xCommandAction(java.lang.Object,
java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |