alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Glassfish example source code file (README)

This example Glassfish source code file (README) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Glassfish tags/keywords

add, add, baseasadmintest, baseasadmintest, does, here, ide, ide, kedar, make, note, that, you, you

The Glassfish README source code

Author: Kedar (km@dev.java.net)
Added: 29 Aug 2008.

Here is a simple recipe to add a new asadmin command test to this test suite.
Please let me know if you like it. Adding a new test should not take
more than 2 minutes, if you know what to test.

0- This suite is meant *exclusively* for asadmin tests. It uses TestNG.
1- Extend BaseAsAdminTest which has got bunch of utility routines.
   The design of this tests is done with this in mind. You have to
   extend BaseAsAdminTest. Don't reinvent the wheel.
2- Start with *CAREFUL* copy + paste.
3- Look at any of the existing subclasses of BaseAsadminTest. Add
   the command of your choice and annotate it with @Test.
   Most of the time what you want is the "Manifest" object from an
   asadmin command invocation. Utilities are provided for the same.
4- Add the command class in ../testng.xml.
5- That's it.

Limitations:
1- Does not use Maven. (That is not a real limitation :))
   Pom.xml is provided only for IDE. It's imperative that
   you use IDE. Just point NetBeans to this pom.xml and your test development
   will be easier. Pom.xml is not used for building.
2- As of now, tests can't be run from this folder. You have to run them from
   the parent folder (../)
3- Assumes a standard setup (default domain.xml etc.).
4- If the suite fails then you'll need to modify domain.xml by hand before
   re-running it.

Note:
1- ../testng.xml
  <parameter name="admin.url" value="http://localhost:4848/__asadmin"/>
  <parameter name="admin.user" value="admin"/>
  <parameter name="admin.password" value=""/>
  are the real parameters available to every test. You don't have to worry
  about this.

TBD:
1- Make the suite runnable with a domain that has password protection.

Other Glassfish examples (source code examples)

Here is a short list of links related to this Glassfish README source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.