TS 73 EJB WithExistingSources

EJB With Existing Sources Test Specification

Author: Radim Roska, Jiri Skrivanek
Version: NetBeans 7.3
Estimated time: 4 hours
Bugzilla: javaee/EJB Project
Last update: 30-th July 2012
Introduction: This test specification is focused on testing of creation of EJB project with existing sources.

Contents


Test suite: Prepare Sources

Purpose: This test suite prepares some sources.

  1. Create EJB Module
    1. Invoke File|New Project... from main menu.
    2. Select Java EE|EJB Module project type. Push Next > button.
    3. Click Next again and make sure GlassFish application server is selected and Java EE 6 version is chosen.
    4. Push Finish button.
    • EXPECTED RESULT: New EJBModule1 project node shows up in Projects tab.
  2. Create entity class
    1. Invoke File|New File... from main menu.
    2. Select Persistence category and Entity Class file type. Push Next > button.
    3. Type entity into Package field and click Next.
    4. Click Finish button.
    • EXPECTED RESULT: New entity class gets created under Source Packages together with specified package.
  3. Create session bean
    1. Invoke File|New File... from main menu.
    2. Select Enterprise JavaBeans category and Session Bean file type and push Next > button.
    3. Type bean into Package field and push Finish button.
    • EXPECTED RESULT: New session bean class is created under Source Packages together with specified package.
  4. Delect EJB project
    1. Right-click on EJBmodule1 in Projects view. and select Delete from popup menu.
    2. Make sure the check button is not checked, so the sources won't be deleted.
    3. Press Yes button.
    • EXPECTED RESULT: Project is closed and all its files are deleted. Just src folder remains in project directory.

Test suite: Create EJB with Existing Sources

Purpose: This test checks its possible to create new ejb project without project files.

  1. Create EJB module from existing sources
    1. Invoke File|New Project... from main menu.
    2. Select Java EE category and EJB Module with Existing Sources project type. Push Next > button.
    3. Press Browse button to find the project folder created in previous test suite.
    4. Click Next.
    5. Make sure GlassFish application server is selected and and Java EE version is set to JAVA EE 6. Press Next > button.
    6. Use Browse button to set Configuration Files Folder to <project dir>/src/conf.
    7. Use Add Folder... button to set Source Packages Folder to <project dir>/src/java.
    8. Push Finish button.
    • EXPECTED RESULT: New EJBModule1 is created. Check project structure to ensure packages are created as it should be (entity, bean).
  2. Deployment
    1. Right-click on EJBmodule1 in Projects view and choose Deploy from popup menu.
    • EXPECTED RESULT: Application server should be started and project should be deployed without any error.
  3. External sources
    1. Download simple-ejb.zip and unzip it somewhere.
    2. Repeat create and deploy test cases. Make sure Java EE version is set to J2EE 1.4.
    3. Download customer-cmp-ejb.zip and unzip it somewhere.
    4. Repeat create and deploy test cases. Make sure Java EE version is set to Java EE 5..
    • EXPECTED RESULT: It should be possible to create and deploy a project created just from downloaded sources.


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