Skip to main content

Testing JSR support of Mobile Device

8 replies [Last post]
cenbells
Offline
Joined: 2007-09-18
Points: 0

Hi Folks,

Currently I'm in investigating the area of JSRs and mobile devices.
There are certain tools out there (e.g., FPCBench, Calibrator, Java Device Test Suite) which can be used to determine if a J2ME platform supports a certain JSR. Mostly they check for JSRs within the Mobile Service Architecture Spec.

Nevertheless, I wondered how I would check whether a mobile device supports a specific JSR. With this question in mind I searched the internet and eventually came across cqME, JavaTest harness, and Java TCK.

Do I understand it correctly that the mentioned software is needed to develop a test for a JSR on a mobile device? If so, is there any documentation or sample available to get a first glance? If no documentation is available, would you mind giving me some advice what testing for JSR support is all about? I heard rumors that some of the above mentioned tools try instantiating a class of the spec.

Kind regards,
Ken

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
simonjlewis
Offline
Joined: 2003-06-10
Points: 0

As a rule each JSR has an associated TCK which is used to demonstrate that the JSR implementation conforms to the specification.

How the TCK is actually implemented depends on the specification lead. A lot use SUN's test harness but there are others including, for example, Motorola's Gatling.

Determining whether a given device supports a JSR is not as onerous as determining whether a JSR implementation is conformant.

The MSA specification defines properties which must be defined if a given JSR is implemented so on an MSA compliant device listing the system properties should reveal which JSRs are implemented.

In the absence of MSA then attempting to instantiate a class within a JSR should reveal whether the JSR is present or not

regards

simon

cenbells
Offline
Joined: 2007-09-18
Points: 0

Thank you simonjlewis,

just as a recap if i got it right.

There are two options for me:
- I have to list the device's system properties to find out whether a certain JSR is implemented or not.
- Try to instantiate a class from within a JSR will do it also.

Kind Regards,
Ken

simonjlewis
Offline
Joined: 2003-06-10
Points: 0

>
> There are two options for me:
> - I have to list the device's system properties to
> find out whether a certain JSR is implemented or not.
>

On a device that is MSA compliant then the system properties will identify which JSRs are present, but if a device is MSA compliant then there are only two possible sets of supported JSRs anyway, MSA and MSA subset.

> - Try to instantiate a class from within a JSR will
> do it also.
>

Creating an instance of a class in a specific JSR, e.g.,

Class.forName("class name").newInstance();

should either succeed in which case the JSR is present, or throw ClassNotFoundException in which case it is not

regards

simon

cenbells
Offline
Joined: 2007-09-18
Points: 0

Thank you Simon,

i have one remaining question (maybe noobish - I'm fairly new to this material).
Can a MSA compliant mobile device support JSRs not included in the MSA?

Kind Regards,
Ken

simonjlewis
Offline
Joined: 2003-06-10
Points: 0

> Can a MSA compliant mobile device support JSRs not
> included in the MSA?

It could do yes. Having said that MSA 'full-set' is pretty comprehensive in terms of the JSRs included and there are not that many 'main-stream' JSRs it does not require. The only one I can think of straight-away is 239, so you could have MSA full-set plus 239. MSA 'sub-set' is smaller. I don't know whether anybody would ship MSA sub-set plus additional JSRs from the remainder of the full-set. I suppose they might. I would have to check the 248 spec to see whether that's been considered, but in general as far as I can see you could have MSA full or sub set plus random other JSRs

regards

simon

Message was edited by: simonjlewis

cenbells
Offline
Joined: 2007-09-18
Points: 0

Simon,

thank you again for answering all my questions.

Kind Regards,
Ken

allenwqf
Offline
Joined: 2007-08-02
Points: 0

Hi all,
when I do the test,use the getNextApp,I find there has no data to get.
why?
I use the $WTK_HOME/bin/emulator -Xautotest http://localhost:8080/test/getNextApp.jad ,and the harness get nothing ,I think there has something wrong with my test.
Can you give me a question?

skavas
Offline
Joined: 2006-10-04
Points: 0

Hi Allen,

what do you try to test? Do you try to run some sample test suite or create another one?
Did you fill configuration interview (Configure -> Edit Configuration)? What implementation base did you choose (Implementation Base question in the interview)?