users@glassfish.java.net

Re: How to add automated testing to client application ...

From: <forums_at_java.net>
Date: Mon, 16 May 2011 09:20:07 -0500 (CDT)

First, make sure your injection works correction when you run without your
test framework using the appclient command.

Next, when using your test framework you need to give the ACC a chance to
actually do the injection.  Just invoking your main class main method is not
sufficient because you have given the ACC no opportunity to prepare the
client for execution.

One way to do this is to use the embedded ACC API, documented here:
http://download.oracle.com/docs/cd/E18930_01/html/821-2418/beakv.html#gipkt

You could write a new, small main program that uses the embedded ACC API to
launch your app client.  The API basically lets you specify from a program
everything you would normally specify on the appclient command.  Then you
could tell the test framework to run this new, small main program rather than
your app client's main class.

- Tim


--
[Message sent by forum member 'tjquinn']
View Post: http://forums.java.net/node/802612