I create unit tests as a stand-alone application (midlet, using j2meunit) which exercises the business logic contained in already-installed modules.
For example, an application that I wish to test is installed on the device as "com_foo_app". I write unit tests in my usual editor (making sure I add the "com_foo_app" project as a dependency of the unit test app) then compile the unit test app to a cod, install it on the device, and run it. Note that I've also installed j2meunit as a module on the device as well (preverify and compile as a library).
BlackBerry doesn't have great lcdui support for whatever reason, but j2meunit is apparently simple enough that it works alright. I'm not really testing a UiApplication vs a MIDlet per se, rather, testing the underlying logic and using a MIDlet to display the results.
|