• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JUnit in J2ME

 
Ranch Hand
Posts: 883
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know the reflection API is not part of J2ME so I can't use JUnit for testing my code.
Is there something similar that does work under J2ME, or are we back to "stone knives and bearskins" aka System.out.println?
Understand, I'm not talking about running under a debugger, I want to run the equivalent of JUnit unit tests on my classes.
thanks,
Burk
 
Author
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know much about JUnit, but you could try searching the kvm-interest archives. It's a pretty good community:
http://archives.java.sun.com/kvm-interest.html
 
Burk Hufnagel
Ranch Hand
Posts: 883
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jonathan,
Thanks for the quick response - I'll take a look.
I must admit though that I'm surprised at your unfamiliarity with JUnit. It's pretty much the standard for unit testing in Java, and I'd gotten the impression that (along with ant, UML, and Design Patterns) it's one of the foundations for Good Java Programming.
All preaching aside, I've found that it really helps during development and it's become a standard here at work. There's tons of info on it, and the home site is at JUnit.org
 
Burk Hufnagel
Ranch Hand
Posts: 883
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I took my own advice and searched junit.org for a J2ME version of JUnit... and found one - though it doesn't seem to have been updated since Dec 2001.
It's a little ugly to use - JUnit uses reflection to simplify life for the programmer writing unit tests - but I think I'll be using it, at least until I find something better, or break down and try to improve it myself.
In any case I strongly recommend using J2MEUnit, or something like it. It wil save you time, and headaches, in the long run.
Burk
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic