Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 253369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:45:22+00:00 2026-05-11T21:45:22+00:00

For my university class we are developing a multi-threaded Blackberry application which allows us

  • 0

For my university class we are developing a multi-threaded Blackberry application which allows us to scan for other devices running our application with Bluetooth and then transfer files to each-other by TCP over the Wifi interface, implementing NAT traversal, all the while logging our GPS location. (It’s a RIM sponsored Computer Networks class in case that wasn’t obvious yet.)

I have grown fond of Test Driven Development and was going to employ it for developing my homework assignment. However, any Blackberry class which I extend or otherwise call during testing gives me a ClassFormatError due to illegal modifiers. I presume this error is caused because the jar with the Blackberry code must have been specially compiled for their proprietary JVM.

So far I’ve resorted to using the Proxy Pattern and implementing Mock Objects of the proxies. However, this is getting very tedious since I’m inheriting from many native Blackberry classes.

I would also like to avoid having to launch the Blackberry simulator if possible. It can take minutes just to boot it up and this is impractical and annoying for unit tests.

Is there am easy way to unit test my Blackberry code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T21:45:22+00:00Added an answer on May 11, 2026 at 9:45 pm

    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

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 122k
  • Answers 122k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Try string s = dt.ToString("H:mm:ss"); Here's the reference page. May 12, 2026 at 12:49 am
  • Editorial Team
    Editorial Team added an answer Have you tried Shark? it comes with the developer tools. May 12, 2026 at 12:49 am
  • Editorial Team
    Editorial Team added an answer How about just allowing a password hint, like Windows does?… May 12, 2026 at 12:49 am

Related Questions

For my Programming 102 class we are asked to deliver C code that compiles
Background: I am taking a class at my university called "Software Constraints". In the
This semester, I took a course in computer graphics at my University. At the
Recently, I've got a dangerous idea into my head after reading this blog post.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.