TS 60 EJB withEx sources

"EJB with existing sources" Test Specification for "NetBeans 6.0"

Author: "Radim Roska"
Version: "1.1"
Estimated time: 4 hours
Default IZ component(s): j2ee/ejbproject
Last update: "2008/03/01"
Introduction: "This test specification is focused on testing of creating EJB project with existing sources.
Comments: "This test specification is writen just for Java EE 5, but it should work for J2EE 1.4 in the same way."

Contents


Test suite: "Sources from NB project"

Purpose: "This test suit prepares some sources."
Setup: "No special setup is required for this test suite. Just follow all the test cases stated below."

  1. "Create EJB module"
    1. Invoke File|New Project... from main menu.
    2. Select Enterprise category and EJB Module project type. Push Next > button.
    3. Make sure GlassFish Application Server is selected and push Finish button.
    • EXPECTED RESULT: "New EJBModule1 project node shows up in Projects tab."
  2. "Create entity"
    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. A warning about a missing persistence unit is displayed: There is no persistence unit in the project yet. You need a persistence unit... Push Create Persistence Unit... button.
    4. Push Create button. Then push 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 category and Session bean file type. Push Next > button.
    3. Type bean into Package field. Push Finish button.
    • EXPECTED RESULT: "New session bean class is created under Source Packages together with specified package."
  4. "Delete EJB project"
    1. Right button click on EJBmodule in Projects view .
    2. Select Delete project from popup menu.
    3. Make sure the check button is not checked, so the sources won't be deleted. Press Yes button.
    • EXPECTED RESULT: "Project is closed and all its files are deleted. Just src and test directories remains in project directory."


Test suite: "New EJB with Existing sources"

Purpose: "this test checks its possible to create new ejb project after deleting project files"
Setup: "nothing special is needed to do."

  1. "Create EJB module from NB sources"
    1. Invoke File|New Project... from main menu.
    2. Select Enterprise category and EJB Module with Existing Sources project type. Push Next > button.
    3. Press Browse button to find the project dir created in last suit. Make sure GlassFish Application Server is selected and and J2EE version is set to JAVA EE5. Press Next > button.
    4. Use Browse button to to set Configuration Files Folder to <project dir>/src/conf. Push Finish button.
    • EXPECTED RESULT: "New EJBModule is created. Check project structure to ensure packages are created as it should be(entity,bean)."
  2. "Deployment"
    1. Right button click on EJBmodule in Projects view .
    2. Choose Deploy Project from popup menu.
    • EXPECTED RESULT: "Java Sun Application Server should be started and project should be deployed without any error."
  3. "Delete project files*
    1. Delete all files and directories from NewEJBModule1 folder except src and test directories.
    2. Restart IDE.
    3. Repeat 1-3 test cases.
    • EXPECTED RESULT: "It should be possible to create and to deploy a project created just from source files."
  4. "Extern source"
    1. Download this this file and unzip it into your home directory.
    2. Repeat 1-3 test cases, and set sources of Java to version J2EE 1.4 in the first test case.
    3. Download this file and unzip it into your home directory.
    4. Repeat 1-3 test cases, and set sources of Java to version Java EE 5 in the first test case.
    • EXPECTED RESULT: "It should be possible to create and to deploy a project created just from source files."


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