TS 61 JSFPages from Entity Classes

"JSF Pages from Entity Class" Test Specification for "NetBeans 6.1"

Author: "Dan Kolar"
Version: "" 0.8
Last update: "03/05/2008"
Introduction: "This is test specification for JSF Pages from Entity Classes. It describe how to test different features of this feature in NetBeans 6.1"
Comments: ""

Contents


JSF Pages from Entity Class UI

  1. First window - Entity classes File:wizard1_TS_61_JSFPages_from_Entity_Classes.PNG
  2. Second window - Generated JSF Pages and Classes File:wizard2_TS_61_JSFPages_from_Entity_Classes.PNG


Test suite: "Creating JSF Pages from Entity Classes "

Purpose: "To test basic actions of JSF Pages from Entity Classes wizard"
Setup: "Empty Web project and File:InvalidEntitiesProject TS 61 JSFPages from Entity Classes.zip test web project with entity classes"

  1. "Web project w/o entity class and persistence unit"
    1. "Invoke New -> JSF Pages from Entity Classes... on web project w/o persistence unit and entity classes"
EXPECTED RESULT: "Message about missing persistence unit is shown, OK button is disabled nad button Create persistence unit is enabled " 
    1. "Click on Create persistence unit"
    2. "Click OK"
EXPECTED RESULT: "Message changes to Select entity class, OK button is disabled and Create persistence unit button has disappeared" 
  1. "Web project with entity class and persistence unit, part 1"
    1. "Invoke New -> JSF Pages from Entity Classes... on test web project with persistence unit and entity classes"
EXPECTED RESULT: "Entity classes from project are in Available entity classes area" 
    1. "Select different entity classes by click, Shift + click and Ctrl + click in Available Entity Classes area"
EXPECTED RESULT: "Entity classes are correctly selected, in dependency with key and mouse click used" 
    1. "Move classes to and from Selected Entity Classes area by Add, Add All, Remove, Remove All buttons"
EXPECTED RESULT: "Entity classes move between Available entity classes and Selected Entity Classes correctly" 
    1. "Add entity class, which references some other entity class."
EXPECTED RESULT: "Dependant classes are grayed, and can't be removed, only removing the class referencing others will remove all dependant classes." 
  1. "Web project with entity class and persistence unit, part 2"
    1. "Invoke JSF from.. on web project with persistence unit and entity classes"
    2. "Click Add All and then Next"
    3. "Fill invalid path to JSF Pages Folder"
EXPECTED RESULT: "Error message about invalid path is shown issue 127131" 
    1. "Fill invalid package name to Package field"
EXPECTED RESULT: "Error message about invalid package is shown issue 127010" 
    1. "Browse to some folder and select it"
    2. "Fill valid package into Package field issue 127010 and click Finish"
EXPECTED RESULT: "New Convertor/controller classes are created in chosen package. New jsp pages are created in chosen destination folder. No errors in java classes and jsp files are shown. Project is compillable. Project can be deployed." 


Test suit: "Creating working web project with sample data storage"

Purpose: "To create working sample web project with sample data storage to demonstrate JSF CRUD generator."
Setup: "New Web Application with Java ServerFaces framework support with default setting."

  1. Creating entity classes from sample derby database.
    1. Invoke "New Entity Classes from Database" dialog.
    2. Select "jdbc/sample" in "Data Source:" combobox."
EXPECTED RESULT: After connecting to derby database and loading database schema, there should be available tables in "Available Tables:" box (e.g. tables: CUSTOMER, DISCOUNT_CODE, MAMMAL, MANUFACTURER, ...). 
    1. Click on "Add All" button to create entity classes for all tables in database.
EXPECTED RESULT: All tables are in "Selected Tables:" box. Dependant classes are grayed, and can't be removed, only removing the class referencing others will remove all dependent classes. 
    1. Click on "Next" button.
    2. Insert "sample" into "Package" text field and invoke dialog clicking on "Create Persistence Unit".
    3. Nothing is needed to change in invoked dialog, just click OK.
    4. Click on "Finish" button.
EXPECTED RESULT:  All entity classes should be created in Source Packages > sample package. No compilation error should be displayed. 
  1. Creating JSF Pages from Entity Classes generated in previous step.
    1. Invoke "New JSF Pages from Entity Classes" dialog.
    2. Add all available entity classes.
    3. Next and Finish button.
EXPECTED RESULT: There should be new folders in Web Pages project folder. One folder for each entity class. In Source packages should be created Controller, Converter, JpaController clas for each entity class. Exceptions and util packages is also created. Projects shouldn't have any compilation error. 
    1. Undeploy and Deploy the project.
    2. Run the project.
EXPECTED RESULT: Undeploy and Deploy project should finished with "All operations completed successfully" and running project should open browser with fully working application. 


Test suite: "Testing results for different inheritance creation"

Purpose: "purpose description"
Setup: " EntityInheritanceProject opened"

  1. "Single Table inheritance"
    1. "Invoke New -> JSF Pages from Entity Classes... on project"
    2. "Select all entity classes in inheritancesingle package and click Next"
    3. "Fill valid path to JSF Pages Folder"
    4. "Fill valid package name to Package field"
    5. "Finish"
    6. "Run project and test new/edit/delete operations on jsp pages"
    • EXPECTED RESULT: "New Convertor/controller classes are created in chosen package. New jsp pages are created in chosen destination folder. No errors in java classes and jsp files are shown. Project is compillable. Project can be deployed. Project can be runned and results of operations with data on jsp are as they should be."
  2. "Joined Table inheritance"
    1. "Invoke wizard on project"
    2. "Select all entity classes in inheritancejoined package and click Next"
    3. "Fill valid path to JSF Pages Folder"
    4. "Fill valid package name to Package field"
    5. "Finish"
    6. "Run project and test new/edit/delete operations on jsp pages"
    • EXPECTED RESULT: "New Convertor/controller classes are created in chosen package. New jsp pages are created in chosen destination folder. No errors in java classes and jsp files are shown. Project is compillable. Project can be deployed. Project can be runned and results of operations with data on jsp are as they should be."



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