"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."
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."
- "Create EJB module"
- Invoke File|New Project... from main menu.
- Select Enterprise category and EJB Module project type. Push Next > button.
- Make sure GlassFish Application Server is selected and push Finish button.
- EXPECTED RESULT: "New EJBModule1 project node shows up in Projects tab."
- "Create entity"
- Invoke File|New File... from main menu.
- Select Persistence category and Entity Class file type. Push Next > button.
- 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.
- Push Create button. Then push Finish button.
- EXPECTED RESULT: "New entity class gets created under Source Packages together with specified package."
- "Create Session bean"
- Invoke File|New File... from main menu.
- Select Enterprise category and Session bean file type. Push Next > button.
- Type bean into Package field. Push Finish button.
- EXPECTED RESULT: "New session bean class is created under Source Packages together with specified package."
- "Delete EJB project"
- Right button click on EJBmodule in Projects view .
- Select Delete project from popup menu.
- 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."
- "Create EJB module from NB sources"
- Invoke File|New Project... from main menu.
- Select Enterprise category and EJB Module with Existing Sources project type. Push Next > button.
- 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.
- 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)."
- "Deployment"
- Right button click on EJBmodule in Projects view .
- Choose Deploy Project from popup menu.
- EXPECTED RESULT: "Java Sun Application Server should be started and project should be deployed without any error."
- "Delete project files*
- Delete all files and directories from NewEJBModule1 folder except src and test directories.
- Restart IDE.
- Repeat 1-3 test cases.
- EXPECTED RESULT: "It should be possible to create and to deploy a project created just from source files."
- "Extern source"
- Download this this file and unzip it into your home directory.
- Repeat 1-3 test cases, and set sources of Java to version J2EE 1.4 in the first test case.
- Download this file and unzip it into your home directory.
- 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."