TS 73 EARProject

EAR Project Test Specification

Author: Jiri Skrivanek
Version: NetBeans 7.3
Last update: 5-th October 2012
Bugzilla: javaee/EAR
Introduction: This test specification is focused on testing Enterprise Application project in NetBeans IDE.


Test suite: New Enterprise Application

  1. New EAR Project
    1. Open new project wizard
    2. Select Java EE|Enterprise Application and click Next
    3. Provide project location and click Next
    4. Choose server from combo box and select Java EE 6 version
    5. Finish wizard
    6. Check project is created
    7. Right-click -ejb project node and choose New|Session Bean
    8. Specify package and click Finish
    9. Right-click in editor, choose Insert Code and select Add Business Method
    10. Confirm creation dialog
    11. Right-click -war project node and choose New|Servlet
    12. Specify package and click Finish
    13. Right-click in editor, choose Insert Code and select Call Enterprise Bean
    14. Browse for session bean from ejb module
    15. Call business method in processRequest method
  2. Managing projects under EAR project
    1. Close -ejb and -war projects
    2. Expand Java EE Modules
    3. Right-click web module and call Open project
    4. Right-click EJB module and call Open project
    5. Right-click EJB module and call Remove
    6. Right-click Java EE Modules and call Add Java EE Module
    7. Select EJB project and click OK

Test suite: Project Actions

  1. Building
    1. Right-click Enterprise Application project node
    2. Invoke Build
    3. Check EAR project and sub projects are built
    4. Invoke Clean and Build
    5. Check EAR project and sub projects are cleaned and built.
    6. Invoke Clean
    7. Check EAR project and sub projects are cleaned.
    8. Invoke Verify
    9. Check EAR project and sub projects are verified.
  2. Running and deploy on save
    1. Invoke Run
    2. Check enterprise application is deployed and browser with welcome page is opened
    3. Open index.jsp from -war project
    4. Change body and save the file which should trigger deploy
    5. Refresh browser and verify it shows new content
    6. Add NewServlet to URL address in browser and open it
    7. Open NewServlet.java in editor and change text in h1 tag
    8. Save it and verify in browser it is deployed
    9. Open NewSessionBean.java from -ejb project
    10. Add some message to business method
    11. Save the file and reload browser with servlet
    12. The message should be printed to server log
    13. Open project Properties on EAR project
    14. Go to Run category and uncheck Deploy on Save
    15. Change and save session bean and servlet again
    16. Check it is not deployed
    17. Change and save index.jsp
    18. Verify it is changed in browser
    19. Open project Properties of -web project
    20. Go to Build|Compiling category
    21. Uncheck Copy Static Resources on Save
    22. Change and save index.jsp
    23. Verify it is not changed in browser
    24. Right-click EAR project and choose Deploy
    25. Verify that all changes are visible in browser and server log
  3. Profiling
    1. Invoke Profile and confirm all dialogs
    2. Check profiler is started and GlassFish server started in profile mode
    3. When task is finished, try Take Snapshot action in Profiler view
    4. Close snapshop opened in editor and stop profiler. It should stop GlassFish as well

Test suite: Sharability

  1. Create project with dedicated folder for storing libraries(sharability)
    1. Open wizard for creating Enterprise application project
    2. Check Use Dedicated Folder for Storing Libraries and finish the wizard
    3. Look into project directory and check that lib directory is created and it contains some default libraries
  2. Adding libraries to dedicated folder
    1. Open Properties of EnterpriseApplication and select category Libraries
    2. Click Add Library
    3. Click Create and confirm creation of empty library with default values
    4. Click Import and choose one of global libraries
    5. Finally in Add Library dialog select imported library and close properties
    6. Add this library in -ejb and -web project to verify that libraries are shared between projects
  3. Creating second project
    1. Create new EAR project, now specify dedicated directory to directory of project created in first testcase (could be e.g. something like ..<name_of_previous_ear_project>/lib)
    2. Add library in project properties and check that all libraries from the first project are available in second project

Test suite: Maven, Java EE 5, J2EE 1.4, Servers

  1. Repeat
    1. Repeat all test suites for Java EE 5 and J2EE 1.4 version
    2. Repeat all test suites for Maven projects (profiling of Maven EAR project is not supported)
    3. Repeat all test suites for other supported servers
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