dev@glassfish.java.net

Admin Console QL Tests

From: Jason Lee <jasondlee_at_sun.com>
Date: Mon, 15 Sep 2008 10:12:31 -0500

I just committed some changes to the QL tests that I hope will be more
effective in catching breakages (of course, it will be a lot more
effective when the admin console is bundled by default ;). Here's the
basic flow of each test:

* @BeforeTest creates a new HttpClient and requests the application
root and wait for the login form to be rendered. This will cover
those cases where the console has not yet been installed, as it will
pause for a few seconds (eventually timing out, if need be), giving
the Grizzly Adaptor time to install the app.
* Once the form is found, @BeforeTest submits the login form,
authenticating the current session.
* Each test requests a specific URL and checks for the presence of a
particular string. The strings I chose are available regardless of
whether or not the Woodstock Javascript executes. The fact that it's
there indicates that the backend code ran fine and the component was
able to render itself.
* @AfterTest nulls the client ivar for good measure

As always, suggestions, criticisms, etc. are accepted, as are
compliments, flowery praise, and, of course, cash rewards. :P
Seriously... feedback welcomed and desired. :)

Jason Lee - x31197
Senior Java Developer, Sun Microsystems
GlassFish Admin Console Team
Email: jasondlee_at_sun.com