On 09/11/08 17:50, Lloyd Chambers wrote:
> Thanks Ming.
on the same topic..
a quick sanity test can be done by going to v3/distributions/web
and then giving mvn -Dmaven.repo.local=/path/to/mvn-repo-local -P
run.sanity.test test
will tell you if the exactly as "java -jar glassfish-10.0-snapshot.jar"
worked fine or not.
This will unzip the web distribution in ../target/sanitywork/
directory.
One could use the same
../distributions/web/target/sanitywork/glassfish as glassfish.home for
running QLs or individual tests.
just fyi.
-hg
>
> 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
>