Skip to main content

Using JTHarness & MEFramework on Device...Distress

5 replies [Last post]
palineo
Offline
Joined: 2009-02-26

Hi everyone,

I began to work on mobile for 2 weeks (yes very newbie...), and I want to make testsuites wich works with JTHarness and ME Framework.

I read a lot of documentation (thank's to Alexey popov's and his friends blogs) and I manage to make and run my testsuites on emulator (automated, distributed, interactive).

Now I want to launch these tests on devices and I'm lost... I tryed to connect on my JTHarness with 3G (OTA?) and after some manipulations it failed on JAD (invalid description).

I saw there is an OTA test but, I am not really sure that it is compatible with interactive test (Am I wrong ?). In fact the question could seem quite simple : "What is the best way to execute testsuite (interactive, automated) on a device ? (OTA?, bluetooth?, wifi?, usb ?) (If anyone knows an example it will be a dream...)"

PS : Sorry I am not very english fluent.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
palineo
Offline
Joined: 2009-02-26

I searched and finally I found some answers (but not all answers).

I modify interview configuration in order to have a valid jad file (server host and server port).

I notice 2 mistakes :

- I manage to launch one automated test (http://host:port/getNextApp.jad under web browser) but it does not enchain with next test.
(see network exchanges part 1 below)

- I do not manage to launch an interactive test
(see network exchanges part 2 below)

I hope these informations are good enough
--------------------

Network exchanges part 1 (automated test) :

- GET /test/getNextApp.jad HTTP/1.1
=>
MIDlet-Name: MIDletAgent
MIDlet-Version: 1.0.0
MIDlet-Vendor: Sun Microsystems, Inc.
MIDlet-Jar-URL: http://myIP:80/test1.jar
MIDlet-Jar-Size: 25605
MIDlet-1: MIDletAgent,, com.sun.tck.midp.javatest.agent.MIDletAgent

- GET /test1.jar HTTP/1.1
=>
The jar file :-)

- GET /test/getNextTest/test1.jar HTTP/1.1
=>
.-com/mydomain/JSR179/T01_SUPPORT_JSR179.html.(com.mydomain.JSR179.T01_SUPPORT_JSR179

- POST /test/sendTestResult/test1.jar HTTP/1.1
.-com/myDomain/JSR179/T01_SUPPORT_JSR179.html..Passed. tests: 1; passed: 1
..test1(): Passed. Success 1.0
..
=> 200 Ok

[b]- GET /test/getNextTest/test1.jar HTTP/1.1
=> 200 Ok ??? [/b]
[i][b]it's so weird isnt'it ? I was waiting for something like /test/getNextText.jad[/b][/i]

-----------------------------------------------------------------------------------------------

Network exchanges part 2 (interactive test) :
- GET /test/getNextApp.jad HTTP/1.1
=>
MIDlet-Name: MIDletAgent
MIDlet-Version: 1.0.0
MIDlet-Vendor: Sun Microsystems, Inc.
MIDlet-Jar-URL: http://myIP:80/test1.jar
MIDlet-Jar-Size: 76744
MIDlet-1: MIDletAgent,, com.sun.tck.midp.javatest.agent.MIDletAgent

- GET /test1.jar HTTP/1.1
=>
The jar file :-)

[b]- GET /test/getNextTest/test1.jar HTTP/1.1
=>
.0com/mydomain/JSR234/T03/T03_STRETCH_IMAGE.html.+com.mydomain.JSR234.T03.T03_STRETCH_IMAGE.
-msgSwitch.2[/b]

[i][b]This answer does not match with the among one and device stay in Initializing state (seems that it does not manage to read the answer (?)).[/b][/i]

Message was edited by: palineo

skavas
Offline
Joined: 2006-10-04

Hi Palineo,
>
> [b]- GET /test/getNextTest/test1.jar HTTP/1.1
> => 200 Ok ??? [/b]
> [i][b]it's so weird isnt'it ? I was waiting for
> something like /test/getNextText.jad[/b][/i]
>
It's OK. You was running one test in bundle and such server response means there is
no any other test to run. The MIDlet exit then, wasn't it?
If you are running many tests and would like them to bundle together in one jar you
should specify "Tests in bundle" question in the interview. Default value is 1 so by
default you need to download and run MIDlet for each test.
> ------------------------------------------------------
> -----------------------------------------
>
>
> [b]- GET /test/getNextTest/test1.jar HTTP/1.1
> =>
> .0com/mydomain/JSR234/T03/T03_STRETCH_IMAGE.html.+com.
> mydomain.JSR234.T03.T03_STRETCH_IMAGE.
> -msgSwitch.2 > .html>[/b]
>
> [i][b]This answer does not match with the among one
> and device stay in Initializing state (seems that it
> does not manage to read the answer (?)).[/b][/i]
>
Looks like the device can't exchange messages with the JT Harness side but very hard
to tell something yet without logs... Did you run successfully this test on emulator?
Try to obtain logs by check all boxes in "Verbose output" question.

Thanks,
Alexander

palineo
Offline
Joined: 2009-02-26

Hi Alexander,

[b]Thank's a lot for your answers! You really help me.[/b]

> It's OK. You was running one test in bundle and such server response means there is
> no any other test to run. The MIDlet exit then, wasn't it?
> If you are running many tests and would like them to bundle together in one jar you
> should specify "Tests in bundle" question in the interview. Default value is 1 so by
> default you need to download and run MIDlet for each test.

[i]You are right, I only modify interview and it works fine.[/i]

> Looks like the device can't exchange messages with the JT Harness side but very hard
> to tell something yet without logs... Did you run successfully this test on emulator?
> Try to obtain logs by check all boxes in "Verbose output" question.

[i]Yes, the test run successfully on emulator (not without difficulty...).

I made some tests after your answers with Verbose output. I will post results soon but I have to check my Network configuration before (it's not necessary to lost your time if my platform is not well configured).

I read more deepness the 'interview configuration' and I saw a parameter that could be bad on my Network :

- 'Specify a port on the JavaTest harness host for use by the communication server: 8088'
=> I assume this is the port used [b]by the device[/b] to exchange message [b]with the communication server[/b]. This port is not open on the server from Internet (I am under an entreprise firewall.) furthermore I am not sure that the network used by the device allowed this port (Maybe am I wrong ? I have to check).[/i]

Thanks.
Brice.

skavas
Offline
Joined: 2006-10-04

Hi Brice,

unfortunately this port should be opened from Internet on JT Harness host. It is used exactly for
exchange messages between device and server in the distributed and interactive tests. Simple
automated tests doesn't use it. The port can't be the same with "Test server port".
If you have another port opened from outside then try it.

Thanks,
Alexander

palineo
Offline
Joined: 2009-02-26

Hi Alexander,

> This port is not open on the server from Internet (I am under an entreprise firewall.)

It was a problem but there was at least another one. When I tried with other port (open this time) I had "OUT_OF_BOUND_PORT Error please contact administrator webpage on the device").

> I am not sure that the network used by the device allowed this port (Maybe am I wrong ? I have to check).

In fact my APN filters ports (I think (?)) after tests I found two open ports that match with my APN (80 and 443) and I manage to launch an interactive test on device. :-)

It's not perfect yet but I think it should work soon.

[b]Thank's a lot for all your answers !!!![/b]