cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

EJB with existing sources Test Specification

Author: Jindrich Sedek
Version: 1.1
Last update: 2006/08/02
Introduction: This test specification is focused on testing of creating EJB project with existing sources.
Comment: This test specification is writen just for Java EE 5, but it should work for J2EE 1.4 in the same way.

Table of Contents

Test suite 1: 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.

#Test caseDescription
1Register application server
  1. Download latest milestone build of GlassFish application server.
  2. Unzip it by java -Xmx256m -jar filename.jar command and install by ant -f setup.xml command.
  3. Launch NetBeans 5.5 and switch to Runtime tab.
  4. Right click Servers node and select Add Server... from popup menu.
  5. Setup GlassFish Application Server as Name and push Next button.
  6. Use Browse... to point to GlassFish installation directory and press Finish.
RESULT:
GlassFish Application Server node shows up under Servers node.
2Create 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.
RESULT:
New EJBModule1 project node shows up in Projects tab.
3Create 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.
RESULT:
New entity class gets created under Source Packages together with specified package.
4Create JavaBeans Component
  1. Invoke File|New File... from main menu.
  2. Select JavaBeans Object category and JavaBeans Component file type. Push Next > button.
  3. Type bean into Package field. Push Finish button.
RESULT: New JavaBean class gets created under Source Packages together with specified package.
5Create WebService
  1. Invoke File|New File... from main menu.
  2. Select Web Services category and Web service file type. Push Next > button.
  3. Type ws into Package field. Push Finish button.
  4. On the 22nd line an error message is highlighted. Set your cursor at 22:1. Press Alt+Enter to invoke hint and press Enter twice to generate default operation.
RESULT: New WebSerice class is created under Source Packages together with specified package and no error is highlited.
6Delete NB 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.
RESULT: Project is closed and all NB files from EJBProject directory are deleted. Just src and test directories rests in project directory.

Test suite 2: New EJB with Existing sources

Purpose: This test suite checks that EJB project can be created after deleting NB project files.
Setup: No special setup is required for this test suite. Just restart IDE should be good idea because it could remember some informations about deleted project.

#Test caseDescription
1Create 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.
RESULT:New EJBModule1 is created.
2Check structure
  1. Deploy Source Packages in Projects view.
  2. Bean, entity and ws packages should be shown. Deploy all of them.
  3. Each one should contain one source file.
RESULT: New EJB module with existing sources should contain all source packages an files.
3Deployment
  1. Right button click on EJBmodule in Projects view .
  2. Choose Deploy Project from popup menu.
RESULT: Java Sun Application Server should be started and project should be deployed without any error.
4Delete NB files
  1. Use main menu to close all open projects.
  2. Delete all files and directories from NewEJBModule1 folder except src and test directories.
  3. Restart IDE.
  4. Repeat 1-3 test cases.
RESULT: It should be possible to create and to deploy a project created just from source files.
5Extern sources
  1. Download 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.

Generated: 2006 08 03 05:48
Companion
Projects:
MySQL Database Server   GlassFish Community: an Open Source Application Server   Open Solaris  Open JDK: an Open SourceJDK   Mobile & Embedded Community     Sponsored by 
Sponsored by Sun Microsystems