Skip to main content

Build SimpleTestSuite - ant problem

9 replies [Last post]
thiagofiora
Offline
Joined: 2009-01-22

Hi, this is my first post and i dindnt found no other post that could help me.

I'm trying to build SimpleTestSuite to use it with JT Harness, and have a lot of doubts.

I'm using JT harness 4.1.4 and ME framework 1.2.1

I edit my "SimpleTestSuite/build/build.properties" like this:

CLDC_CLASSES=${C:/Wireless_Tool_Kit/Sun}/lib/cldcapi10.jar
MIDP_SPEC_CLASSES=${C:/Wireless_Tool_Kit/Sun}/lib/midpapi20.jar
MIDP_HOME=${C:/Wireless_Tool_Kit/Sun}
PREVERIFIER_EXTRA_PATH=${C:/Wireless_Tool_Kit/Sun}/lib/midpapi20.jar
TESTSUITE_NAME=SimpleTestSuite

The { } continue there or must be deleted?

Then, i change to "SimpleTestSuite/build" and typed "ant samples", like said in the readme file, and get the following error:

Buildfile: build.xml

BUILD FAILED
Target "samples" does not exist in the project "SimpleTestSuite".

Total Time: 0 seconds

Well, for now is this.

Thank you,
Fiora

Message was edited by: thiagofiora

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
skavas
Offline
Joined: 2006-10-04

Looks like the MIDlet suite was not signed and was not installed in the special domain - untrusted domain. You need to align your interview in JT Harness with emulator command-line's options. That is add "-Xdomain:untrusted" in the command line or answer "Yes" on "Trusted MIDlets supported" question and choose "Trusted mode" then.

Thanks,
Alexander

thiagofiora
Offline
Joined: 2009-01-22

Well,

i'm almost there... now that i'm reading this pdf again, i am understanding it more!

My problem now is:
I answered the interview, then put the tests SimpleTestSuite to run and when i start the Sun Wirelles Tool Kit like in the framework_dev_guide.pdf

"c:\Wireless_Tool_Kit\Sun\bin\emulator -Xautotest:http://MACHINE_NAME:8080/test/getNextApp.jad"

i get the following error from the emulator:

"MIDletAgent: There is no 'javax.microedition.io.Connector.http' permission"

what this could be??

I googled it and found no one single result for it!!

Thanks,
Fiora

thiagofiora
Offline
Joined: 2009-01-22

Problem Resolved!

The problem was the "security" utilized for the emulation, that can be modified in the 'preferences' of the emulator.

thiagofiora
Offline
Joined: 2009-01-22

Hi Alexander, thanks to you i resolved my problem.

The right slash is this: "/" and i was using the other "\"

What i changed was "local.properties" and not "build.properties", the first is to configure the variables to the ant know the correct path to cldc, midp and others.

Really really thank you.

One, last question:

Now that it was build correct, how do i start the ME ?? =)

skavas
Offline
Joined: 2006-10-04

Hi Fiora,

Do I understand correctly you are trying to start the ME Framework's sample?
Just type 'java -jar lib/javatest.jar' in command line from 'fw12-build/SimpleTestSuite' directory.

Just curious are you just evaluating some test's tools or are you trying to write some ME tests?

As you know ME Framework is the plugin for the JT Harness allows to run Java ME tests on devices or emulators. In order to know more about framework please read the following guide:
http://java.sun.com/javame/meframework/docs/framework_dev_guide.pdf

Thanks,
Alexander

thiagofiora
Offline
Joined: 2009-01-22

Hi Alexander,

"Just curious are you just evaluating some test's tools or are you trying to write some ME tests?"

Well, the truth is that i'm trying both.

I was reading that pdf, but i I started getting confused, so i decided to start some practical test... and now i'm here. =)

If i'm not wrong, the tutorial i followed above teachs how to integrate JT + ME + Samples.

First, i'm trying to run some tests on emulator and device, to understand how the Tests + JT + ME works.

Then, i'll write my own tests.

Thanks,
Fiora

thiagofiora
Offline
Joined: 2009-01-22

Hi,

i'm following this guide:
http://forums.java.net/jive/ann.jspa?annID=79

and when i typed "ant" i get de following error:

---------------------------------------------------------------------------------------
BUILD FAILED
C:\cqME\fw12\build\jar-targets.xml:34: The following error ocurred while executing this line:
C:\cqme\fw12\build\common-tasks.xml:127:Compile failed; see the compiler error output for details.

Total time: 5 seconds
---------------------------------------------------------------------------------------

I dont know were to find the compiler output error.

Thanks.

skavas
Offline
Joined: 2006-10-04

Hi Fiora,

I see from previous your post you was trying to start ant from build directory of the sample. The best solution to start ant from the build directory of the ME Framework as described in the guide mentioned above.

Most likely the compiler errors caused by incorrect setup of some properties. Could you post the output of the 'ant init' command in order to review the most important.

Note: you should not modify CLDC_CLASSES, MIDP_SPEC_CLASSES, MIDP_HOME, PREVERIFIER_EXTRA_PATH, TESTSUITE_NAME properties. Just create local.properties file as described in the guide.

Thanks,
Alexander

thiagofiora
Offline
Joined: 2009-01-22

Hi Alexander,

here is my "ant init" and i found some errors aready.

First, the right path to wirelees toolkit is
"C\:Wireless_Tool_Kit\Sun" instead of "C\:Wireless_Tool_KitSun".

Second, i dont know wich slash is the right "\" or "/".

I had to modify my "local.properties" because i'm at windows, not linux.

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

C:\cqME\fw12\build>ant init
Buildfile: build.xml

compile-ant-helpers:

load-and-set-properties:
[loadDefs] OS: win
[loadDefs] HostName: 192.168.10.225
[loadDefs] Load from: C:\cqME\fw12\build\build.properties

set-jar-names:

init:
[echo] --------------------------------------------
[echoproperties] #Ant properties
[echoproperties] #Mon Jan 26 14:20:05 BRST 2009
[echoproperties] BUILD_DATE=26 Jan 2009 14\:20\:05 -0200
[echoproperties] BUILD_ID=development
[echoproperties] CLDC_1_1_CLASSES=C\:Wireless_Tool_KitSun/lib/cldcapi11.jar
[echoproperties] CLDC_CLASSES=C\:Wireless_Tool_KitSun/lib/cldcapi10.jar
[echoproperties] COMM_JAR=C\:cqMEcommcomm.jar
[echoproperties] DSTAMP=20090126
[echoproperties] FCS_JCTTOOLS=C\:cqMEjtharness-4_1_4
[echoproperties] FP_HOME=C\:cqME\fp\fp-1.1.2
[echoproperties] FP_SPEC_CLASSES=C\:cqME\fp\fp-1.1.2/lib/btclasses.zip\:C\:cqME\fp\fp-1.1.2/lib/foundation.jar
[echoproperties] J2SE_API_URL=http\://java.sun.com/j2se/1.5.0/docs/api/
[echoproperties] JAVADOC_COPYRIGHT=Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.
[echoproperties] JAVAHELP_JAR=C\:cqMEjh2.0javahelplibjh.jar
[echoproperties] JTHARNESS_JAR=C\:cqMEjtharness-4_1_4/lib/javatest.jar
[echoproperties] MIDP_HOME=C\:Wireless_Tool_KitSun
[echoproperties] MIDP_SPEC_CLASSES=C\:Wireless_Tool_KitSun/lib/midpapi20.jar
[echoproperties] PBP_1_1_SPEC_CLASSES=C\:cqMEpbpOptimized_nosym/lib/basis.jar
[echoproperties] PBP_HOME=C\:cqMEpbpOptimized_nosym
[echoproperties] PBP_SPEC_CLASSES=C\:cqMEpbpOptimized_nosym/lib/basis.jar
[echoproperties] PP_HOME=C\:cqMEppOptimized_nosym
[echoproperties] PP_SPEC_CLASSES=C\:cqMEppOptimized_nosym/lib/personal.jar
[echoproperties] PREVERIFIER_EXTRA_PATH=C\:Wireless_Tool_KitSun/lib/midpapi20.jar
[echoproperties] PRODUCT=j2me-tck-framework
[echoproperties] PRODUCT_LONG=ME Framework
[echoproperties] TODAY=January 26 2009
[echoproperties] TSTAMP=1420
[echoproperties] VERSION=121
[echoproperties] VERSION_LONG=1.2.1
[echoproperties] WIRELESS_TOOLKIT=C\:Wireless_Tool_KitSun
[echo] --------------------------------------------

BUILD SUCCESSFUL
Total time: 0 seconds
C:\cqME\fw12\build>

Thanks