Glassfish

"GlassFish v2 Test Specification for NetBeans 6.1"

Author: Radim Roska
Version: 1.2
Estimated time: 4 hours
Default IZ component(s): serverplugins/sunappserv9
Last update: 2008/05/19
Introduction: This test specification is focused on testing netbeans support for application server GlassFish version 2.
Comments: NetBeans installed by installer already most probably contains GlassFish server instance.

Contents


Test suite: Register GlassFish

Purpose: To verify a GlassFish server instance can be easily added/removed and used within the IDE.
Setup: I assume you have already installed GlassFish on your computer.(Either from installer or manually from https://glassfish.dev.java.net/.

  1. Register GlassFish
    1. If GlassFish is already in serverices view in Servers node, remove it by right click -> remove
    2. In services view perform add server action on Servers node
    3. Select GlassFish V2
    4. Clean Platform Location text field => Provide a valid Application Server location.. error msg should appear at the bottom of dialog
    5. Specify correct location, where GlassFish is installed. (using Browse button)
    6. Select Create Personal Domain, next.
    7. Specify path where domain will be created, etc... Finish.
    8. Check your domain is correctly created.
    9. Add another GF instace again, now select Register remote domain in Platform Folder Location step of wizard.
    10. Specify hostname and port number of remote glassfish installation. Next.
    11. Enter username and password. Finish
    12. Check GlassFish node in services view.
    13. Add third GF instance, now select Register local domain in Platform Folder Location step of wizard.
    14. Specify location of existing glassfish domain, port should be autodetected. Next.
    15. Enter username and password. Finish
    16. Check GlassFish node in services view.
    17. Add GF again, now Register default local domain.
    18. Default Local Domain should be find automatically (if bundled gf is installed). Push Next button
    19. Set password as: adminadmin. Finish.
    20. Remove some glassfish instance. Add this instance again.
    21. Check GlassFish node in services view.
    22. Go through properties. (right click at gf node - Properties)
    23. Server Manager is opened.
    • EXPECTED RESULT: All operations works fine.
  1. Server manager
    1. Open Tools - Servers
    2. Check settings of application server in Connection, Classes, Sources, Javadoc, Options tabs.
    3. In opened dialog try to remove and add GlassFish server.
    • EXPECTED RESULT: Works correctly. Settings are correct - domains folder, domain name,username,...


Test suite: Managing GlassFish

Purpose: To verify a GlassFish can be controlled from IDE.

  1. GlassFish server instance
    1. Perform start action on GlassFish server node.
    2. Check output window, there should be server log displayed.
    3. When server starts, you can ensure its really running e.g. on GNU/Linux by running command
        netstat -al | grep 4848 
      (of course depends on which port server really listens - was specified while adding server to IDE, can be seen in properties)
    4. Perform refresh action on GlassFish.
    5. Perform stop action.
    6. Again you can check it stopped e.g. by netstat command.
    7. Start server in debug mode.
    8. Perform restart action server.
    9. Close output window. And perform Show server log operation.
    10. Perform View admin console action.
    11. Perform View Update Center action.
    12. Stop server.
    13. Start server in profile mode. Confirm appeared dialogs.
    14. Stop server.
    15. Perform previous steps for all GF instances.
    16. Set not valid password in properties of some glassfish instance.
    17. Start server. Error message "Authentication failed" appears after few seconds.
    • EXPECTED RESULT: Server responds to the operations correctly. Icon in services view is changing with server status. Appropriate string (e.g. "Starting Glassfish V2") appears in the status bar when operation is performed. Server log is displayed when it should be. Performing View admin console actions runs browser with configuration tool. View Update Center opens GlassFish Update Center dialog. For every registered instance operation works fine.


Test suite: Managing GlassFish from the output window

Purpose: To verify a GlassFish can be controlled from its output window.

  1. GlassFish server instance
    1. Open GlassFish Output window (Perform View Server Log on you GlassFish server node)
    2. Perform Start the Server action in the opened output tab (the first button).
    3. Check output window, GlassFish should be started - there should be somethink like this "Application server startup complete.".
    4. Perform Refresh the Server Status action in output tab of the GlassFish server.
    5. Perform Stop the Server action in output tab.
    6. Check GlassFish server should be down.
    7. Start server in Debug mode with the help of the second button in output window.
    8. Perform Restart the Server action in this window.
    • EXPECTED RESULT: Server responds to the operations correctly. Icon in services view is changing with server status. Appropriate string (e.g. "Starting Glassfish V2") appears in the status bar when operation is performed.


Test suite: Deployment

Purpose: To verify a j2ee projects can be deployed to server using IDE.
Setup: Deploy few applications(ear, web, ejb..) to glassfish.

  1. Deploying Web Application
    1. Start application server and expand its node in services view.
    2. Stop server.
    3. Create Maven Web Application. Be sure to select GlassFish (it should be default) in Properties.
    4. Run new application while server is down. Server has to start automatically.
    5. Application welcome page should be displayed in new tab of your browser.
    6. Change "Hello World!" in index.jsp ( and run Undeploy and deploy operation. Refresh your browser when its done.
    7. Perform debug operation on Web Application.
    8. Again index.jsp should be displayed in your browser.
    • EXPECTED RESULT: All operations run successfully. Project wizard always set correct j2ee version. After deploying changed application(modified jsp page) result in browser has to be changed too.
  1. "Application Node"
    1. Expand Servers - Glassfish V2 - Applications node in Services View
    2. Check deployed applications are correctly placed in proper subnodes - Enterprise Applications, Web Applications, EJB Modules, Connector Modules, App Client Modules.
    3. Find among applications e.g. WebApplication.
    4. Perform disable operation on this application. Try to refresh this webapplication in web browser..it should not be available. Check also properties of this application - enabled = false
    5. Perform enable, result is expectable:).
    6. Undeploy some of created applications and ensure its really undeployed, either in admin console or by trying to access its url in browser.
    • EXPECTED RESULT: "All apps are in proper subnodes. Its possible to undeploy them correctly.."


Test suite: Resources

Purpose: To verify a j2ee projects can be deployed to server using IDE.
Setup: Deploy few applications(ear, web, ejb..) to glassfish.

  1. Resource Node
    1. Select Resource node (Services View - Servers - Glassfish V2 - Resources)
    2. It has 6 direct subnodes (JDBC, JMS Resources, JavaMail Sessions, JNDI, Connectors, JVM). All nodes here support Refresh operation (right click)
    3. All resources support operation : delete resource and properties.
    4. Try them both.
    5. In some project create all kind of GlassFish resources (File - New File - GlassFish - JDBC Connection Pool/JDBC Resourec/JMS Resource/JavaMail Session)
    6. Deploy this project to the glassfish.
    • EXPECTED RESULT: After deploying project with created resource expand all Resources subnodes and check that created resources are there. It should correspond to sun-resources.xml in Server Resources in project.


Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo