dev@glassfish.java.net

Re: [ANN] v3 QL tests are now 24 in number ...

From: Lloyd Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Fri, 12 Sep 2008 13:17:36 -0700

Yes, the amx-api jar file is available in the repo. But aren't
various ant targets required in quicklook/amx/build.xml also?

...........

I added this to quicklook/build.properties:

# for amx-api-10.0-SNAPSHOT.jar
amx-api.jarpath=${maven.repo.local}/org/glassfish/common/amx-api/10.0-
SNAPSHOT

And quicklook/amx/build.xml contains:

<project name="amx" default="default" basedir=".">
     <property file="${ws.root}/build.properties"/>
     <property file="build.properties"/>
     <property file="${ws.root}/gfproject/${deploy.platform}-
config.properties"/>
...


..............................................
Lloyd Chambers
lloyd.chambers_at_sun.com
GlassFish team, LSARC member


On Sep 11, 2008, at 6:26 PM, Ming Zhang wrote:

> Will amx-api.jar be available in maven.repo.local? If it will, the
> location of amx-api.jar can be set in quicklook/build.properties. In
> build.xml of local amx test dir, add one line to pick up the path to
> the jar:
> <property file="${ws.root}/build.properties"/>
>
> You can use quicklook/classloader/hellojsf as an exmple. Now the
> test use maven.repo.local at the top level build.properties.
>
> Ming
>
> Lloyd Chambers wrote:
>> Thanks Ming.
>>
>> I have it working.
>>
>> But here's a question: my tests need the amx-api jar. This is fine
>> when I do 'mvn test'; I inserted a dependency into pom.xml.
>>
>> But when I do 'ant build' it can't find the jar. How/where do I
>> tell ant to pick up the jar?
>>
>> Lloyd
>>
>>
>> On Sep 11, 2008, at 5:49 PM, Ming Zhang wrote:
>>
>>> Hi Lloyd,
>>>
>>> From the error message, it seems to me that you didn't set
>>> glassfish.home. You can use:
>>> ant -Dglassfish.home={V3 Dir} runtest
>>>
>>> Ming
>>>
>>> Lloyd Chambers wrote:
>>>> Kedar et al,
>>>>
>>>> I'm trying to set up AMX for quicklook.
>>>>
>>>> I have it built.
>>>>
>>>> How can I run it by itself?
>>>>
>>>> I understand that certain things are inherited, but clearly it
>>>> wants a path I must specify (see below). It's what variables to
>>>> set and where.
>>>>
>>>> Lloyd
>>>>
>>>>
>>>> ...............
>>>>
>>>> MB2:amx lloyd$ ant runtest
>>>> Buildfile: build.xml
>>>>
>>>> runtest:
>>>>
>>>> runtest-impl:
>>>>
>>>> compile-tests:
>>>> [echo] compiling test client to ..//classes/test
>>>> [javac] Compiling 3 source files to /v3/code/tests/quicklook/
>>>> classes/test
>>>>
>>>> checkTestNGXML:
>>>>
>>>> runtest-impl-class:
>>>> [echo] =============Starting TestNG test at ..//classes/test
>>>> ============
>>>>
>>>> BUILD FAILED
>>>> /v3/code/tests/quicklook/amx/build.xml:53: The following error
>>>> occurred while executing this line:
>>>> /v3/code/tests/quicklook/gfproject/build-impl.xml:294: The
>>>> following error occurred while executing this line:
>>>> /v3/code/tests/quicklook/gfproject/build-impl.xml:304: /v3/code/
>>>> tests/quicklook/amx/C:/Sun/v3/glassfish not found.
>>>>
>>>> Total time: 0 seconds
>>>>
>>>>
>>>>
>>>> Lloyd
>>>>
>>>>
>>>> On Aug 30, 2008, at 6:38 PM, Kedar Mhaswade wrote:
>>>>
>>>>>
>>>>>
>>>>> Judy Tang wrote:
>>>>>> Fist feedback is thank you so much Kedar :-)
>>>>> You are welcome.
>>>>>> Would like to know how do you test if command is pass or fail,
>>>>>> do you look for
>>>>>> return code or return message paten match, or both ?
>>>>>
>>>>> The asadmin protocol is based on Manifests (java.util.jar fame)
>>>>> and what is
>>>>> written into them.
>>>>>
>>>>> Whenever a command fails, it should set the Manifest (main)
>>>>> attribute named
>>>>> "exit-code" to "FAILURE". When this is true, usually another
>>>>> Manifest
>>>>> (main) attribute named "cause" should contain the message. Thus,
>>>>> whether a
>>>>> command succeeds is determined by the "exit-code" Manifest
>>>>> attribute which can one of the following three values:
>>>>> "SUCCESS", "FAILURE", "WARNING" (not sure
>>>>> what "WARNING" means). This is the gist of the programmatic
>>>>> asadmin API.
>>>>>
>>>>> This is how command developers (like me) are supposed to write
>>>>> commands.
>>>>>
>>>>> For better or for worse, the values that we (developers) put
>>>>> into Manifest
>>>>> attributes named ("exit-code", "cause", "children", "message")
>>>>> have become
>>>>> the public interface of GlassFish v3. These strings have some
>>>>> restrictions, for
>>>>> example, the value of "children" is supposed to be a list of
>>>>> items delimited by ';', they can't contain new-line character etc.
>>>>>
>>>>> I don't think this is likely to change soon, although this is
>>>>> rather risky and fragile. I hope all command developers and
>>>>> users are aware of this fact.
>>>>>
>>>>> -Kedar
>>>>>
>>>>>> Thanks,
>>>>>> Judy
>>>>>> Kedar Mhaswade wrote:
>>>>>>> I have increased the coverage of v3 QL test suite by 60%! :-P
>>>>>>>
>>>>>>> No kidding, but now the number of tests is (only) 24 in number
>>>>>>> (from
>>>>>>> an earlier 15). All these tests are written to test asadmin
>>>>>>> commands.
>>>>>>> So, if you have written an AdminCommand, consider adding a test
>>>>>>> to test it out. IMO, adding an asadmin command test is easier
>>>>>>> than
>>>>>>> ever before and is documented at [1]. This is because I ended up
>>>>>>> writing a small framework to write tests for remote asadmin
>>>>>>> commands. It's
>>>>>>> still being improved to handle some corner cases, but you
>>>>>>> should be
>>>>>>> able to test your asadmin command out.
>>>>>>>
>>>>>>> I am looking for feedback.
>>>>>>>
>>>>>>> See https://glassfish.dev.java.net/issues/show_bug.cgi?id=5760
>>>>>>> for
>>>>>>> details.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Kedar
>>>>>>>
>>>>>>> 1- http://tinyurl.com/5q3pzh
>>>>>>>
>>>>>>> PS - Sorry if you received multiple copies of this message.
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>>>>>>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>>>>>> For additional commands, e-mail: admin-
>>>>>> help_at_glassfish.dev.java.net
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>