TS 60 EARProject

EAR Project Test Specification for

Author: Radim Roska,Martin Schovanek
Estimated time: 4 hours
Default IZ component(s): j2ee/earproject
Version: 1.4
Last update: 2008/03/31
Comments: Little outdated specs for ear project - See: Enterprise Application Project UI Spec (). Sharability is in 6.1 added feature for sharing libraries among netbeans projects.


Contents


Test suite: New EAR Project Wizard

Purpose: Test creating of projects
Setup:

  1. Create J2EE 1.4 project
    1. file - new project - enterprise - enterprise application
    2. next
    3. set java EE Version to J2EE 1.4
    4. finish -> ear project has been created with web and ejb project
    5. right click on EnteprirseApplicationXX-ejb (name of ear project + "-ejb")
    6. new file - session bean (specify package,finish)
    7. new file - entity bean (specify package,finish)
    8. right click on EntepriseApplicationXX-war
    9. new file - servlet (specify package,finish)
    10. in editor right click - insert code - call Enterprise Bean and choose session bean from ejb module
    • EXPECTED RESULT: EAR project is created with. Ejb and war module are created, ejb and war projects are under 'Java EE Modules' node of ear project.
  1. Create Java EE 5 project
    1. create new Java EE 5 project - steps are almost the same as in first test case. Just set J2ee 5 in step 3.
    • EXPECTED RESULT: EAR project is created with. Ejb and war module are created, ejb and war projects are under 'Java EE Modules' node of ear project.


Test suite: Managing projects under EAR project

Purpose: Test opening and removing projects under EAR project
Setup: Create some Java EE 5 project with web module and ejb module

  1. Managing Java EE 5 project
    1. close all other windows than your EAR project
    2. expand Java EE Modules
    3. rightclick on the web module and invoke Open project
    4. rightclick on the ejb module and invoke Remove
    • EXPECTED RESULT: EJB module should be removed from the Java EE Modules. WEB module should be opened.


Test suite: EAR Project Views

Purpose: Test actions available for ear project.
Setup:

  1. File window
    1. open the Files view
    2. expand the EAR project's folders
    • EXPECTED RESULT: The projects folders content is valid. That means you will see directories nbproject,src and test and build.xml file. There are deployment descriptors in src/conf in Java J2EE 1.4 project.


  1. Enterprise Application Node
    1. right click on EAR project and do operations : build, verify, undeploy & deploy, clean, run and debug EAR projects (j2ee 1.4 and j2ee 5)
    2. undeploy & deploy will start application server
    3. run will deploy app on application server again and open index.jsp in browser. Append to URL /NewServlet (URL of created Servlet).
    4. debug will start glassfish in debug mode
    • EXPECTED RESULT: All actions finish successfully. Check output window there is no error. Build will create build and dist directory in each module, clean will delete them. This you can check in file view.
  1. Properties dialog
    1. open Properties on EAR project's nodes in the Projects view.
    2. check Sources , Build and Run panels.
    • EXPECTED RESULT: The panels' content is valid. Correct J2ee version, paths, app server, etc.
  1. Other operations
    1. in Project view perform following actions: delete some file, package, invoke fix server dependencies(when project depends on server that is no longer registered in IDE), rename, refactor, delete project.
    2. create new ejb project,web project, application client and add them to ear project by right click on EAR project - Add Java EE Module
    • EXPECTED RESULT: IDE behave as you expect;).



Test suite: Sharability (Shared libraries among projects)

Purpose: Ensure "sharability" is working.
Setup:

  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" Next.
    3. Check "Use dedicated library folder for server JAR files". Finish.
    • EXPECTED RESULT: EAR project is created. Look into project directory and check that lib directory is there(it's default location). Check that libs for your application server are there in correct directory(e.g. for glassfish v.2 GlassFish_V2)
  1. Adding libraries to dedicated folder.
    1. In properties of EnterpriseApplication -> libraries -> Add Library. Import or Create library.
    2. In Web/EJB project in libraries dialog import another library.
    3. Add to Web or EJB project library - available libraries are JUnit libs and 2 libs you have imported in previous steps.
    • EXPECTED RESULT: After each step check nblibraries.properties file in your dedicated directory(probably <Project_folder>/lib). It has to contain newly imported libs. Check libs are really where there should be (according to this configuration file).
  1. 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.
    • EXPECTED RESULT: You can choose any library from list that you have created in previous testcases.


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