Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JUnit in J2ME

 
Burk Hufnagel
Ranch Hand
Posts: 814
3
  • Mark post as helpful
  • send pies
  • 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
 
Jonathan Knudsen
Author
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • 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: 814
3
  • Mark post as helpful
  • send pies
  • 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: 814
3
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic