Mockup testing
Youre on the right way about mockuping, but I wouldn't advice you to test Blackberry functionality on J2SE platform. I think proxys and mockups should be used in case when there are no testing data available in native source, examples:
"scan for other devices" - there are no other devices but you wan to test scan functionality
"TCP over the Wifi interface" - you want to test it on Storm (no WiFi)
"logging our GPS location" - device location is static, but you want to test other locations
Then you can mockup such functionality using Blackberry platform:
BlackBerry GPS location mockup
Still you can reproduce BlackBerry API class on J2SE from the scratch simply using same names and signatures. That would presume youll have to implement all class functionality by yourself.
Testing j2me without simulator
That would be a really great option, but so far I can't see how to do this.
Testing involves application running and this involves platform simulation. There can be some possibility to test j2me code without whole UI simulator running but I don't know it.
What you can do is test some business logic on Java Standard Edition with minimum code changes.
You still need to run platform dependant functionality testing on simulator, but you can do it in one application, which would be a set of unit tests, like ChrisW already said. Simply run test methods one by one and output results on screen:
Method1 - Passed - 0.03 s
Method2 - Passed - 1.30 s
Method3 - Passed - 0.25 s
J2MEUnit
http://j2meunit.sourceforge.net/:
J2MEUnit is a Java 2 Micro Edition
(J2ME) library containing a unit
testing framework for J2ME
applications. It is based on the
source code of the original JUnit, the
successful unit testing framework for
the standard (desktop) edition of
Java, J2SE.
Unit Testing J2ME applications with J2MEUnit and Eclipse
Quick Tutorial to setup & learn J2MEUnit
JMUnit
http://jmunit.sourceforge.net/:
JMUnit is a unit test framework for
Java ME (J2ME) based on JUnit. It has
the following features:
- Works in both the Sun emulator and on actual devices.
- Is small (tests can be run even on old MIDP 1.0 devices).
- Has a comprehensive collection of Assert methods for checking test
failures.
- Both TestCases and TestSuites are supported.
- Includes Ant tasks for running JMUnit tests in a continuous build.
- Has performance monitoring classes inspired by JUnitPerf.
Writing and running JMUnit tests
BUnit
Unit Testing library for RIM
Blackberry based on jmunit
http://sourceforge.net/projects/b-unittesting/
BlackBerry Support Community Forums: How to do unit testing my Blackberry Application
Additional
How To - Automate testing with the BlackBerry Simulator