Sun Microsystems / Rave QE

EJB Consumption Test Specification

Contents
Test Specification Identifier
       Features to be tested
       Approach Refinements
       Related documentation
       Test Identification
       Test Cases
Approvals
Revision History

Test Specification identifier
http://qa.netbeans.org/modules/webapps/promo-h/ejb-consumption.html


(F) Features to be tested

Features that will be Implemented and Tested for LongFin Release

  • Testing Interface for Session EJB
  • Adding EJB Set to Services Tab (stateful, stateless, only client jar file, jar and ear file, only ear file, invalid jar file, invalid ear file, client jar file without java package, multiple client jar files into a session bean, multiple session beans in a module, with methods taking no param, with 1 param, with many params, with different types of params, with methods returning void, with methods returning primitives, with methods returning user objects, with methods returning collections, with methods returning Maps, with methods returning Array)
  • EJB subnode operations (Refresh, Modify, Remove, Configure Methods)
  • Adding EJB to Projects
  • Binding EJB with components via DataProviders
  • Export EJB Set
  • Import EJB Set

(A) Approach refinements

   This exercise would comprise of :
  • Identifying a list of EJBs that can be used by this testing
  • Identifying features that need to be tested/verified by this testing
  • Applications, that should be deployed to different application servers

  • (D) Related documentation.

    (T) Test Identification (Test Areas)


    Test Cases Detail/Procedure

    "Enterprise Java Beans" node

    Setup (e):

    EJB_Node_01

    1)Select "Enterprise Java Beans" node in Server Navigator and Right click
    2) press esc key on keyboad
    3) Select Enterprise Java Beans Node in Server Navigator and click right mouse button
    4) click on any part of application

    1) Popup menu with following items should appear
    Add Set of Session EJBs...
    Import EJB sets...
    Export EJB sets...
    2) the popup menu should disappear
    4) the popup menu should disappear

    EJB_Node_02

    1) Expand Enterprise Java Beans Node, by clicking on +
    2) Minimize Enterprise Java Beans Node, by clicking on -

    1) following applications should appear
    Converter, HelloWorld and Travel.
    2) The node should be minimized.

    EJB_Node_03

    1)Select Enterprise Java Beans Node in Server Navigator and Right click
    2) select menu item, Add Set of Session EJBs...

    2) Add set of session EJBs window should appear


    Add set of Session EJBs

    Setup (e):

    EJB_Dia_01
    Dialog, No Client jar

    1) Select Enterprise Java Beans Node in "Servers" and click right mouse button
    2) select menu item "Add Set of Session EJBs..."
    3) select the default choices and click "Next"
    4) click "OK" in the error-dialog
    5) click "Cancel" button

    3) The error-dialog with message "Add client jar file" should appear
    5) the dialog box should disappear

    EJB_Dia_02
    Cancel

    1) Select Enterprise Java Beans Node in "Servers" and click right mouse button
    2) select menu item "Add Set of Session EJBs..."
    3) click "Cancel" button

    3) the dialog box should disappear

    EJB_Dia_03
    Invalid Client Jar

    1) Select Enterprise Java Beans Node in "Servers" and click right mouse button
    2) select menu item "Add Set of Session EJBs..."
    3) select the default choices except for RMI-IIOP port, change the port number to 24700 and click button "Add" in the "Client Jar file"
    4) select some invalid client jar-file(for example, empty jar-file or jar-file, containing directory META-INF only) and click "Open"
    5) click "Next" in the dialog
    6) click "OK" in the Error-dialog
    7) click "Cancel" in the dialog "Add Set of Session EJBs..."

    2) Dialog "Add Set of Session EJBs..." should appear
    3) open file browser should appear, where you can select the jar file
    5) error-dialog with message about invalid jar should appear.
    6) error-dialog should disappear
    7) the tree of EJB Sets in the window "Servers" should not contain new node related to the invalid client jar

    *
    EJB_Dia_04
    Valid Client Jar

    1) Select "Enterprise Java Beans" node in Server Navigator and click right mouse button
    2) select menu item, Add Set of Session EJBs...
    3) select the default choices except for RMI-IIOP port, change the port number to 24700 and click button "Add" in the "Client Jar file"
    4) select simple stateless jar file and click "Open"
    5) click "Next" button and then click "Finish" button in the dialog
    6) Create a new application, where by some of the methods from the recently added ejb should be used.

    Creating Application: In order to use the session bean following things need to be done
    1. From the Server Navigator, expand the Enterprise Java Beans Node and select the bean you wanted to use, drag and drop it on the designer page or select the bean/module, right click and select Add to Page, Verify that the bean is added in the tray, verify the icons and make sure the library references are added in project navigator.
    2. In the action item of button or where ever you want to call the other methods, invoke the appropriate methods

    2) Add set of session EJBs window should appear
    3) open file browser should appear, where you can select the jar file
    4) the jar file should be added in the Add set of session ejbs
    5) the new ejb should be added and it should appear as sub node in the Enterprise Java Beans Node
    6) the application should able to use the services of the ejbs.

    *
    EJB_Dia_05
    Valid Client and ear file

    1) Select "Enterprise Java Beans" node in Server Navigator and click right mouse button
    2) select menu item "Add Set of Session EJBs..."
    3) select the default choices except for RMI-IIOP port, change the port number to 24700 and click "Add" button in the "Client jar file"
    4) select simple stateless jar file and click "Open"
    5) click "Browse" button and select a valid ear file, related to the above jar file and click "Open"
    6) click "Next" button and then click "Finish" button in the dialog
    7) Create a new application, whereby some of the methods from the recently added ejb should be used.

    2) Add set of session EJBs window should appear
    3) open file browser should appear, where you can select the jar file
    4) the jar file should be added in the Add set of session ejbs
    6) the new ejb should be added and it should appear as sub node in the Enterprise Java Beans Node
    7) the application should able to use the services of the ejbs.

    EJB_Dia_06
    Valid Client and Invalid ear file

    1) Select "Enterprise Java Beans" node in Server Navigator and click right mouse button
    2) select menu item "Add Set of Session EJBs..."
    3) select the default choices except for RMI-IIOP port, change the port number to 24700 and click "Add" button in the "Client jar file"
    4) select simple stateless jar file and click "Open"
    5) click "Browse" button, select an invalid ear-file and then click "Open"
    6) click "Next" button and then click "Finish" button in the dialog
    7) create a new application, whereby some of the methods from the recently added ejb should be used.

    2) Add set of session EJBs window should appear
    3) open file browser should appear, where you can select the jar file
    4) the jar file should be added in the Add set of session ejbs
    5) the new ejb should be added and it should appear as sub node in the Enterprise Java Beans Node (since a valid client jar is added, even though an invalid ear file is added, ear file will not be considered)
    7) the application should able to use the services of the ejbs.

    EJB_Dia_07
    No Client jar, only ear file

    1) Select "Enterprise Java Beans" node in Server Navigator and click right mouse button
    2) select menu item "Add Set of Session EJBs..."
    3) click "Browse" button, select a valid ear file and click "Open"
    4) click "Next" button in the dialog
    5) click "OK" in the Error-dialog
    6) click "Cancel" in the dialog "Add Set of Session EJBs..."

    2) "Add set of session EJBs" dialog should appear
    3) the ear file should be selected and added
    4) error dialog box should appear
    5) error-dialog should disappear
    6) the tree of EJB Sets in the window "Servers" should not contain new node related to the ear-file

    EJB_Dia_08
    Invalid Client jar, Invalid ear file

    1) Select Enterprise Java Beans Node in "Servers" and click right mouse button
    2) select menu item "Add Set of Session EJBs..."
    3) click "Browse" button, select an invalid ear file and click "Open"
    4) select the default choices except for RMI-IIOP port, change the port number to 24700 and click "Add" button in the "Client jar file"
    5) select some invalid client jar-file(for example, empty jar-file or jar-file, containing directory META-INF only) and click "Open"
    6) click "Next" in the dialog
    7) click "OK" in the Error-dialog
    8) click "Cancel" in the dialog "Add Set of Session EJBs..."

    2) "Add set of session EJBs" dialog should appear
    3) ear file should be added
    5) client jar file should be added to the list
    6) error dialog box should appear
    7) error-dialog should disappear
    8) the tree of EJB Sets in the window "Servers" should not contain new node

    EJB_Dia_09
    No package jar

    Note: This requires creation of the ear file and jar files without a package, by default all other examples are with a package.


    1) Select Enterprise Java Beans Node in "Servers" and click right mouse button
    2) select menu item "Add Set of Session EJBs..."
    3) click "Browse" button, select a valid ear file without package and click "Open"
    4) select the default choices except for RMI-IIOP port, change the port number to 24700 and click "Add" button in the "Client jar file"
    5) select a valid client jar-file without package and click "Open"
    6) click "Next" in the dialog
    7) click "OK" in the Error-dialog
    8) click "Cancel" in the dialog "Add Set of Session EJBs..."

    6) dialog box specifying that package unavailability should come up
    2) "Add set of session EJBs" dialog should appear
    3) ear file should be added
    5) client jar file should be added to the list
    6) error dialog box should appear (message: "...home and/or remote interfaces have no packages...")
    7) error-dialog should disappear
    8) the tree of EJB Sets in the window "Servers" should not contain new node

    EJB_Dia_10
    two session beans in module

    1) Select Enterprise Java Beans Node in "Servers" and click right mouse button
    2) select menu item "Add Set of Session EJBs..."
    3) select the default choices except for RMI-IIOP port, change the port number to 24700 and click "Add" button in the "Client jar file"
    4) select client jar file, containing 2 session stateless EJBs, and click "Open"
    5) click "Browse" button and select a valid ear file, related to the above jar file and click "Open"
    6) click "Next" button and then click "Finish" button in the dialog
    7) Create a new application, whereby some of the methods from the recently added ejb should be used.

    2) Add set of session EJBs window should appear
    3) open file browser should appear, where you can select the jar file
    4) the jar file should be added in the Add set of session ejbs
    6) the new ejb should be added and it should appear as subnode of the node "Enterprise Java Beans"
    7) the application should able to use the services of the ejbs.

    EJB_Dia_11
    Add Button

    1)Select Enterprise Java Beans Node in Server Navigator and Right click
    2) select menu item, Add Set of Session EJBs...
    3) Click on Add button to Add client Jar file
    4) click on cancel button
    5) select cancel button

    2)Add Set of Session EJBs should appear, buttons Back and Finish should be in disabled mode
    3)File Open window should appear, with file of types, text box with JAR Files (.jar).
    4)File Open window should disappear.
    5) Add Set of Session EJBs dialog box should disappear

    EJB_Dia_12
    Browse Button

    1)Select Enterprise Java Beans Node in Server Navigator and Right click
    2) select menu item, Add Set of Session EJBs...
    3) Click on Browse button to Add jar or ear file
    4) click on cancel button
    5) select cancel button

    2)Add Set of Session EJBs should appear, buttons Back and Finish should be in disabled mode
    3)File Open window should appear, with file of types, text box with EAR or JAR Files (.ear or jar).
    4)File Open window should disappear.
    5) Add Set of Session EJBs dialog box should disappear

    EJB_Dia_13
    Cancel Button in Configure EJB Methods window

    1)Select Enterprise Java Beans Node in Server Navigator and Right click
    2)Select menu item, Add Set of Session EJBs...
    3)Select the default choices except for RMI-IIOP port, change the port number to 24700 and select Add button next to client jar file,
    4) In the File Open window browse and select simple stateless jar file and click open
    5)Select Next button in the Add set of session EJBs window
    6)In Configure EJB Methods window EJB with all the available methods should appear.
    7)Select the methods.
    8)Select Cancel button

    2) Add set of session EJBs window should appear
    3) File Open window should appear, with file of types, text box with JAR Files (.jar).
    4)Add jar file in the Add set of session ejbs
    5)Configure EJB Methods window should appear with Back and Finish buttons in enabled state and Next button in disabled state.
    7)Method name, return type and exception type should appear in the text box.
    8)Configure EJB Methods window should disappear

    EJB_Dia_14
    Back button

    1)Select Enterprise Java Beans Node in Server Navigator and Right click
    2)Select menu item, Add Set of Session EJBs...
    3)Enter new values for EJB Set name, server host and RMI-IIOP port, and change value for Application Server
    4)Click button "Add" in the "Client Jar file", select jar file and click "Open"
    5)Select Next button in the Add set of session EJBs window
    6)Select Back button

    2)Add set of session EJBs window should appear.
    4)The jar file should be added in the Add set of session ejbs.
    6)Entered values should not be changed.

    EJB_Dia_15
    Add Delete Client jar

    1)Select Enterprise Java Beans Node in Server Navigator and Right click
    2)Select menu item, Add Set of Session EJBs...
    3)Click button "Add" in the "Client Jar file", select jar file and click "Open"
    4)Select added above jar and click Remove button.
    5)Select Next button

    2)Add set of session EJBs window should appear.
    3)The jar file should be added in the Add set of session ejbs.
    4)The jar file should be removed in the Add set of session ejbs.
    5)The error-dialog with message "Add client jar file" should appear

    EJB_Dia_16
    Add Next Back Delete Client jar

    1)Select Enterprise Java Beans Node in Server Navigator and Right click
    2)Select menu item, Add Set of Session EJBs...
    3)Click button "Add" in the "Client Jar file", select jar file and click "Open"
    4)Select Next button, select Back button.
    5)Select added above jar and click Remove button.
    6)Select Next button

    2)Add set of session EJBs window should appear.
    3)The jar file should be added in the Add set of session ejbs.
    5)The jar file should be removed in the Add set of session ejbs.
    6)The error-dialog with message "Add client jar file" should appear

    *
    EJB_Dia_17
    Add two EJBs
    Remove one

    1)Select Enterprise Java Beans Node in Server Navigator and Right click
    2)Select menu item, Add Set of Session EJBs...
    3)Click button "Add" in the "Client Jar file", select first jar file and click "Open"
    4)Click button "Add" in the "Client Jar file", select second jar file and click "Open"
    5)Select Next button
    6)Select Back button.
    7)Select added above first jar and click Remove button.
    8)Select Next button

    2)Add set of session EJBs window should appear.
    3)First jar file should be added in the Add set of session ejbs.
    4)Second jar file should be added in the Add set of session ejbs.
    5)Methods of two jars should appear in Configure EJB Methods
    7)First jar file should be removed in the Add set of session ejbs.
    8)Methods of second jar should appear in Configure EJB Methods

    EJB_Dia_18
    Finish without needed params

    1)Select Enterprise Java Beans Node in Server Navigator and Right click
    2)Select menu item, Add Set of Session EJBs...
    3)Click button "Add" in the "Client Jar file", select some jar file with method with param that should be specified and click "Open"
    4)Select Next button and Finish button.

    2)Add set of session EJBs window should appear.
    3)The jar file should be added in the Add set of session ejbs.
    4)The error-dialog with message "One or more ... element types are not specified" should appear

    *
    EJB_Dia_19
    Finish with wrong param name

    1)Select Enterprise Java Beans Node in Server Navigator and Right click
    2)Select menu item, Add Set of Session EJBs...
    3)Click button "Add" in the "Client Jar file", select some jar file with method with param that should be specified and click "Open"
    4)Select Next button.
    5)In Configure EJB Methods window change param name to some reserved word and Finish button.

    2)Add set of session EJBs window should appear.
    3)The jar file should be added in the Add set of session ejbs.
    5)The error-dialog should appear

    EJB_Dia_20
    Add EJB with many different methods

    1)Select Enterprise Java Beans Node in Server Navigator and Right click
    2)Select menu item, Add Set of Session EJBs...
    3)Click button "Add" in the "Client Jar file", select some jar file with many different methods (methods taking no param, 1 param, many params, different types of params, methods returning void, primitives, user objects, collections, Maps, Array) and click "Open"
    4)Select Next button.
    5)In Configure EJB Methods window select each method.

    2)Add set of session EJBs window should appear.
    3)The jar file should be added in the Add set of session ejbs.
    5)Return Type, Element Class and Parameters should be correctly reflected for each method.

    EJB_Dia_21
    Add EJB with method returning Collection with wrong Element Class

    1)Select Enterprise Java Beans Node in Server Navigator and Right click
    2)Select menu item, Add Set of Session EJBs...
    3)Click button "Add" in the "Client Jar file", select some jar file with method returning Collection and click "Open"
    4)Select Next button.
    5)In Configure EJB Methods window enter wrong Element Class ($WRONG_CLASS) and click Finish button.

    2)Add set of session EJBs window should appear.
    3)The jar file should be added in the Add set of session ejbs.
    5)The error-dialog with message "Class $WRONG_CLASS not found" should appear.

    EJB_Dia_22
    Add EJB with method returning Collection with right Element Class

    1)Select Enterprise Java Beans Node in Server Navigator and Right click
    2)Select menu item, Add Set of Session EJBs...
    3)Click button "Add" in the "Client Jar file", select some jar file with method returning Collection and click "Open"
    4)Select Next button.
    5)In Configure EJB Methods window enter right Element Class and click Finish button.

    2)Add set of session EJBs window should appear.
    3)The jar file should be added in the Add set of session ejbs.
    5)The new ejb should be added and it should appear as subnode of the node "Enterprise Java Beans"

    EJB_Dia_23
    Add EJB with methods returning void and non void value

    1)Select Enterprise Java Beans Node in Server Navigator and Right click
    2)Select menu item, Add Set of Session EJBs...
    3)Click button "Add" in the "Client Jar file", select some jar file with methods returning void and non void value and click "Open"
    4)Select Next button and Finish button.

    2)Add set of session EJBs window should appear.
    3)The jar file should be added in the Add set of session ejbs.
    4)The new ejb should be added and it should appear as subnode of the node "Enterprise Java Beans" and icons for methods should be different.

    EJB_Dia_24
    Add EJB without any business methods

    1) Select Enterprise Java Beans Node in "Servers" and click right mouse button
    2) select menu item "Add Set of Session EJBs..."
    3) select the default choices except for RMI-IIOP port, change the port number to 24700 and click "Add" button in the "Client jar file"
    4) select client jar file for a stateless session EJB, which has no business methods, and click "Open"
    5) click "Next" button and then click "Finish" button in the dialog

    2) Add set of session EJBs window should appear
    3) open file browser should appear, where you can select the jar file
    4) the jar file should be added in the Add set of session ejbs
    5) an error-dialog should appear

    bug 6379945 (java.lang.ClassCastException: javax.swing.tree.DefaultMutableTreeNode) fix delivered, should be verified


    EJB subnode

    Setup (e):

    EJB_Subnode_01
    Check popup menu

    1) Select one of the ejbs recently added under "Enterprise Java Beans" node in Server Navigator and click right mouse button on it
    2) Press ESC on keyboard
    3) Select "Enterprise Java Beans" node in Server Navigator and Right click
    4) click on any part of application

    1) Popup menu with following items should appear
    Refresh
    Modify
    Remote
    Configure Methods
    Export EJB Set
    2) the popup menu should disappear
    4) the popup menu should disappear

    EJB_Subnode_02
    Expand and collapse subnode

    1) Expand any EJB subnode, by clicking on +
    2) Minimize "Enterprise Java Beans" node, by clicking on -

    1) it should expand and should show the components under it
    2) The node should be minimized.

    $
    EJB_Subnode_03
    Refresh

    1) Add an EJB Set under "Enterprise Java Beans" node in "Servers"
    2) Check for available EJB-business methods in the added EJB Set

    3) Create new project and into Page1.java add java-code, where any existing EJB business method is invoked.
    4) Add one more business method to the above EJB and redeploy it
    5) Right click EJB Set and select the popup menu item "Refresh".

    6) Into Page1.java add java-code, where new added EJB's business method is invoked.

    3) After typing of generated ejb-client name with dot and pressing Ctrl+Space, list with EJB business methods and other available methods should appear in the java-editor

    5) Components under subnode should be refreshed, new business method, added into EJB, should be shown up, classes in generated jars should be updated/refreshed correctly.

    6) New added EJB business method should be displayed in method list after pressing Ctrl+Space.

    bug 6439117 new added EJB business method isn't displayed in method list.

    *
    EJB_Subnode_04
    Modify

    1) Select Enterprise Java Beans Node in "Servers" and click right mouse button
    2) select menu item "Add Set of Session EJBs..."
    3) select the default choices (RMI-IIOP port number to 3700) and click "Add" button in the "Client jar file"
    4) select simple stateless jar file and click "Open"
    5) click "Next" button and then click "Finish" button in the dialog
    6) Create a new Web Application, where by some of the methods from the recently added ejb should be used.
    7) Click right mouse button on the added EJB Set and select from popup menu the item " Modify"
    8) "Modify EJB Set" window will appear. Change the RMI-IIOP port number to 24700 and click OK
    9) Deploy the Web Application again.
    10) Application should be deployed successfully.

    2) "Add Set of Session EJB" window should appear
    3) open file browser should appear, where you can select the jar file
    4) the jar file should be added in the Add set of session ejbs
    5) the new ejb should be added and it should appear as sub node in the Enterprise Java Beans Node
    6) after application deployment and using of EJB-method into it the exception should be thrown - javax.naming.NameNotFoundException: No object bound for java:comp/env/<ejb_jndi_name>.
    8) the window "Modify EJB Set" should disappear.
    10) there should be no any exception thrown after deployment and an appropriate value should be received from EJB business method

    EJB_Subnode_05
    Remove

    1) Select Enterprise Java Beans Node in "Servers" and click right mouse button
    2) select menu item "Add Set of Session EJBs..."
    3) select the default choices except for RMI-IIOP port, change the port number to 24700 and click button "Add" in the "Client Jar file"
    4) select simple stateless jar file and click "Open"
    5) click "Next" button and then click "Finish" button in the dialog
    6) Select the added EJB Set, click right mouse button on it and select from popup menu the item "Remove"

    2) Add set of session EJBs window should appear
    3) open file browser should appear, where you can select the jar file
    4) the jar file should be added in the Add set of session ejbs
    5) the new ejb should be added and it should appear as sub node in the Enterprise Java Beans Node
    6) the appropriate EJB Set node should disappear from the window "Servers"

    EJB_Subnode_06
    Properties

    1) Select Enterprise Java Beans Node in "Servers" and click right mouse button
    2) select menu item "Add Set of Session EJBs..."
    3) select the default choices except for RMI-IIOP port, change the port number to 24700 and click button "Add" in the "Client Jar file"
    4) select simple stateless jar file and click "Open"
    5) click "Next" button and then click "Finish" button in the dialog
    6) Select the added EJB Set and change in the window "Properties" values of these properties: Name, Server Host, RMI-IIOP Port
    7) Click right mouse button on the added EJB Set and select from popup menu the item " Modify"

    7) New values should appear in the window "Modify EJB Set"


    Add EJB to a project

    Setup (e):

    EJB_dataProvider_01

    1)Create an EJB and deploy it in the App Server
    2)Add the EJB in Creator
    3)Create a new project
    4)Drag and drop a business method from the above created EJB onto the designer

    4)A dataprovider with name $EJBname$methodname should be added under application window in the newley created project.
    Client instance should be acutomatically created. The client instance is set in the data provider instance.

    EJB_dataProvider_02

    1)Create an EJB and deploy it in the App Server
    2)Add the EJB in Creator
    3)Create a new project
    4)Drag and drop a business method from the above created EJB onto the designer
    5)Right click on the dataprovider under application window and select Delete

    4)A dataprovider with name $methodnameDataProvider should be added under application window in the newley created project.
    5)dataprovider should be deleted from the project

    *
    EJB_dataProvider_03

    1)Create an EJB and deploy it in the App Server
    2)Add the EJB in Creator
    3)Create a new project.
    4)Drag and drop an EJB onto the designer.
    5)Drag and drop a business method from the above created EJB onto the designer

    4)Client instance should be created under application window.
    5)A dataprovider with name $EJBname$methodname should be added under application window in the newley created project.
    The client instance is set in the data provider instance.

    EJB_dataProvider_04

    1)Create an EJB and deploy it in the App Server
    2)Add the EJB in Creator
    3)Create a new project
    4)Drag and drop the ejb multiple times and then drop a method.
    5)Select client instance and click OK button.

    4)Dialog should appear to ask you to select a client instance.
    5)Make sure the correct client instance is set in the data provider instance.


    Export EJB Set

    Setup (e):

    EJB_Export_01
    1 EJB, Default export

    1) Select one of the ejbs recently added under "Enterprise Java Beans" node in Server Navigator and click right mouse button on it
    2) Select the menu item "Export EJB Set..." in the appeared popup menu
    3) Click the button "OK" in the appeared dialog "Export EJB Sets"
    4) Click the button "OK" in the appeared information dialog box
    5) Manually check that a directory, which was indicated in the information dialog box, contains an appropriate exported jar-file

    2) dialog "Export EJB Sets" should appear, checkbox related to selected EJB Set should be checked in the list of available EJB Sets
    4) dialog box with exported message should appear

    EJB_Export_02
    1 EJB, Specified export path

    1) Select one of the ejbs recently added under "Enterprise Java Beans" node in Server Navigator and click right mouse button on it
    2) Select the menu item "Export EJB Set..." in the appeared popup menu
    3) Click the button "Browse" and in the appeared dialog "Export EJB Sets" fill in the text field "File Name" with new value of exported jar (full name, i.e. directory + file name). Then click the button "Save".
    4) Click the button "OK" in the dialog "Export EJB Sets"
    5) Click the button "OK" in the appeared information dialog box
    6) Manually check that a directory, which was indicated in the information dialog box, contains an appropriate exported jar-file

    2) dialog "Export EJB Sets" should appear, checkbox related to selected EJB Set should be checked in the list of available EJB Sets
    4) The desired full name of exported jar should appear in the text field "File Name" of the dialog "Export EJB Sets"
    5) dialog box with exported message should appear

    *
    EJB_Export_03
    Export of All EJBs

    1) Select one of the ejbs recently added under "Enterprise Java Beans" node in Server Navigator and click right mouse button on it
    2) Select the menu item "Export EJB Set..." in the appeared popup menu
    3) Click the button "Select All" in the appeared dialog "Export EJB Sets"
    4) Click the button "Clear All"
    5) Click the button "Select All"
    6) Click the button "OK" in the dialog "Export EJB Sets"
    7) Click the button "OK" in the appeared information dialog box
    8) Manually check that a directory, which was indicated in the information dialog box, contains an appropriate exported jar-file

    2) dialog "Export EJB Sets" should appear, checkbox related to selected EJB Set should be checked in the list of available EJB Sets
    3) all checkboxes related to EJB Sets should be checked in the list of available EJB Sets
    4) all checkboxes related to EJB Sets should be unchecked in the list of available EJB Sets
    6) dialog box with exported message should appear

    EJB_Export_04
    "Enterprise Java Beans" node, Export of All EJBs

    1) Select node "Enterprise Java Beans" in Server Navigator and click right mouse button on it
    2) Select the menu item "Export EJB Set..." in the appeared popup menu
    3) Click the button "OK" in the appeared dialog "Export EJB Sets"
    4) Click the button "OK" in the appeared information dialog box
    5) Manually check that a directory, which was indicated in the information dialog box, contains an appropriate exported jar-file

    2) dialog "Export EJB Sets" should appear, all checkboxes related to EJB Sets should be checked in the list of available EJB Sets
    4) dialog box with exported message should appear

    EJB_Export_05
    "Enterprise Java Beans" node,
    Export of 1 EJB

    1) Select node "Enterprise Java Beans" in Server Navigator and click right mouse button on it
    2) Select the menu item "Export EJB Sets..." in the appeared popup menu
    3) In the appeared dialog "Export EJB Sets" uncheck all checkboxes in the appropriate list of EJBs
    4) Check 1 checkboxes in the list of EJBs
    5) Click the button "OK" in the dialog "Export EJB Sets"
    6) Click the button "OK" in the appeared information dialog box
    7) Manually check that a directory, which was indicated in the information dialog box, contains an appropriate exported jar-file

    2) dialog "Export EJB Sets" should appear, all checkboxes related to EJB Sets should be checked in the list of available EJB Sets
    4) 1 checkbox related to selected EJB Set should be checked in the list of available EJB Sets6) dialog box with exported message should appear

    EJB_Export_06
    Export cancel

    1) Select one of the ejbs recently added under "Enterprise Java Beans" node in Server Navigator and click right mouse button on it
    2) Select the menu item "Export EJB Sets..." in the appeared popup menu
    3) Click the button "Cancel" in the appeared dialog "Export EJB Sets"

    2) dialog "Export EJB Sets" should appear, checkbox related to selected EJB Set should be checked in the list of available EJB Sets
    3) dialog "Export EJB Sets" should disappear

    EJB_Export_07
    Help

    1) Select node "Enterprise Java Beans" in Server Navigator and click right mouse button on it
    2) Select the menu item "Export EJB Sets..." in the appeared popup menu
    3) Click the button "Help" in the appeared dialog "Export EJB Sets"

    2) dialog "Export EJB Sets" should appear, all checkboxes related to EJB Sets should be checked in the list of available EJB Sets
    3) Help dialog should appear


    Import EJB Set

    Setup (e):

    EJB_Import_01
    "Enterprise Java Beans" node
    Import of 1 EJB

    1) Select node "Enterprise Java Beans" in Server Navigator and click right mouse button on it
    2) Select the menu item "Import EJB Sets..." in the appeared popup menu
    3) Select the previously created "exported_ejb_datasources.jar", which contains 1 EJB Set only, and click the button "Open"
    4) Click the button "OK" in the dialog "Import EJB Sets"

    2) dialog "Open" should appear
    3) dialog "Import EJB Sets " should appear. A list of available EJB Sets should contain 1 item only and its checkbox should be checked
    4) New EJB Set should be added as subnode of the node "Enterprise Java Beans"

    *
    EJB_Import_02
    "Enterprise Java Beans" node
    Import of 2 EJBs

    1) Select node "Enterprise Java Beans" in Server Navigator and click right mouse button on it
    2) Select the menu item "Import EJB Sets..." in the appeared popup menu
    3) Select the previously created "exported_ejb_datasources.jar", which contains 2 EJB Sets only, and click the button "Open"
    4) Click the button "OK" in the dialog "Import EJB Sets"

    2) dialog "Open" should appear
    3) dialog "Import EJB Sets " should appear. A list of available EJB Sets should contain 2 item only and theirs checkboxes should be checked
    4) New EJB Sets should be added as subnodes of the node "Enterprise Java Beans"

    EJB_Import_03
    "Enterprise Java Beans" node
    Clear & Import of 1 EJB

    1) Select node "Enterprise Java Beans" in Server Navigator and click right mouse button on it
    2) Select the menu item "Import EJB Sets..." in the appeared popup menu
    3) Select the previously created "exported_ejb_datasources.jar", which contains 2 EJB Sets only, and click the button "Open"
    4) Click the button "Clear" in the dialog "Import EJB Sets"
    5) Check one of the EJBs from the EJB Sets' list
    6) Click the button "OK" in the dialog "Import EJB Sets"

    2) dialog "Open" should appear
    3) dialog "Import EJB Sets " should appear. A list of available EJB Sets should contain 2 item only and theirs checkboxes should be checked
    4) all checkboxes in the list of available EJB Sets should be unchecked
    6) 1 new EJB Set should be added as subnode of the node "Enterprise Java Beans"


    Additional tests

    Setup (e):

    $
    Font Size_01

    1)Exit the IDE if running
    2)Start the ide from the command line and specify the font size
    ($installDir/bin/runide.exe -fontsize 16)
    3)Check the font size
    4)Right click the Enterprise java bean node in the server navigator and select Add set of session EJBs





    4)The components in the Add set of session EJBs window should not be distorted

    $
    Font Size_02

    1)Right click on one of the existing Applications under the Enterprise Java Beans node in the server navigator and select modify
    2)Modify EJB set window should pop up




    2)The components in the Modify EJB set window should not be distorted

    Method with void return type

    1)Create an EJB, one of the business method with void return type
    2)Deploy it in the App Server
    3)Add the EJB in Creator
    4)Create a new project
    5)Drag and drop the void method onto the design

    5)Cursor type should be "non dropable" and there shouldn't be a dataprovider created for this method

    Change argument name of EJB method and check EJB method properties

    1)Create an EJB, one of the business method which takes an input parameter
    2)Deploy it in the App server
    3)Add the EJB in Creator
    4)In Configure EJB Methods dialog change the name of the argument from arg0 to argument1
    5)Expand the EJB added and click on the method and check the property of the method


    5)In the properties window under method parameters, name is changed to the one you entered in the previous step (argument1)

    2 EJBs with the same name but different methods

    1)Create two EJB's with the same name, BUT in a different package structure with different method names
    2)Deploy them in App server
    3)Add both the EJBs in Creator
    4)Create a project
    5)Drag and drop the methods from the two EJBs
    6)Bind data providers of two EJBs to two different components.
    7)Deploy the application

    5)Since the two methods belong to two different casses, two independent client instances should be created (One per each method)
    7)Application should run successfully.

    Check sun-web.xml file

    1)Create a EJB with a business method that returns a String
    2)Deploy it in the App server and Add it in Creator
    3)Create a project, drag and drop the EJB method  on to the designer, drag and drop a component from the pallet and bind the data provider to the component.
    4)Deploy the application
    5)Create a new EJB with a business method that returns a String (different from the above EJB)
    6)Deploy it in the App server and Add it in Creator
    7)Drag and drop the EJB method created in step 5 on to the project designer created in step 3, drag and drop a component from the pallet and bind the data provider to the component.
    8)Deploy the application

    4)The app should run successfully





    8)The application should run successfully and should show both the components.

    $ Migration Test (from Creator 2.0 to 2.1):
    Web Application Project, consuming EJB

    1) Check out from CVS the file "/cvs/rave/ejb/test/ejb_data/EJB_Valid_JAR/EJB_Valid_JAR.ear" and store it somewhere
    2) Install Creator 2.0 with fresh userdir and start Sun Application Server 8.1 PE, bundled with it.
    3) Deploy the stored "EJB_Valid_JAR.ear" on SAS 8.1.
    "Admin Console" of Sun Application Server 8.1 can be used for this:

    • in the web-browser type the URL "http://localhost:24848/index.html"

    • type "admin" as "User Name" and "adminadmin" as "Password"

    • in the left frame "Common tasks" click left mouse button on the tree node "Applications -> Enterprise Applications"

    • in the appeared right frame "Enterprise Applications" click the button "Deploy"

    • click the button "Browse" and define the location of the stored EAR-file (after that a full path to this EAR-file should appear in the text field "File To Upload")

    • click the button "Next" in the top right corner of the frame

    • in the section "Advanced" mark checkboxes "Verifier" and "RMIStubs" and then click the button "OK" in the top right corner of the frame (when the EAR-file is deployed, its name will appear in the table of deployed Enterprise Applications)

    • the location of the created EJB's client-jar will be:
      "<Creator_2.0_Install_Dir>/SunAppServer8/domains/creator/applications/j2ee-apps/EJB_Valid_JAR\EJB_Valid_JARClient.jar"

    4) Create a new Web Project in Creator 2.0 IDE
    5) In the window "Servers" click the right mouse button on the tree node "Enterprise Java Beans" and in the appeared popup menu select the item "Add Set of Session EJBs...".
    6) In the appeared dialog change a value of RMI-IIOP port to "23700" (use default EJB-Set Name: "DeployedEjbApp1").
    7) Press the button "Add..." and then in the dialog "Open" select the file "<Creator_2.0_Install_Dir>/SunAppServer8/domains/creator/applications/j2ee-apps/EJB_Valid_JAR\EJB_Valid_JARClient.jar" and press the button "Open" (full name of client-jar will be shown in the text area "Client jar available...").
    8) Click the button "Next" and then the button "Finish".
    9) Put the component "Text Field" on Designer.
    10) In the window "Servers" expand a tree subnode, related to added just now EJB Set, drag the subnode "EJB_Greeter | getGreeting" and drop it on the added component (in the window "Outline" the tree node "greeterGetGreeting1", related to the created DataProvider, will appear).
    11) click right mouse button on the "Text Field" and in the appeared popup-menu select the item "Bind to Data..."
    12) in the appeared dialog select the tab "Bind to an Object", expand the tree node "greeterGetGreeting1", select the subnode "property: resultObject" and then press the button "OK".
    13) Run project.
    14) Undeploy web-application, stop SAS 8.1, quit Creator 2.0 IDE.
    15) Install Creator 2.1 and start IDE. In the appeared dialog "Confirm Import Settings" click the button "Yes".
    16) Start Sun Application Server 8.2 PE, bundled with it, and deploy the stored "EJB_Valid_JAR.ear" on SAS 8.2 (URL for "Admin Console" of Sun Application Server 8.2 is "http://localhost:25848/index.html" ).
    17) In the window "Servers" click the right mouse button on the tree node "DeployedEjbApp1" and in the appeared popup menu select the item "Modify...".
    18) In the appeared dialog change a value of RMI-IIOP port to "24700" and click the button "OK".
    19) Run project
    20) Undeploy web-application, stop SAS 8.2, quit Creator 2.1 IDE, remove directory "<user_home>/.Creator" for further testing.

    13) Result:
    a text field with text "Hello World" should appear in a web-browser.

    15) Result:

    • directory "<user_home>/.Creator/2_1/ejb-datasource" should contains:
      - directory "javaSRC"
      - files: "DeployedEjbApp1ClientWrapper.jar", "DeployedEjbApp1DesignTime.jar", "ejbsources.xml"

    • in the window "Server" the tree node "Enterprise Java Beans" should have the subnode "DeployedEjbApp1"

    • in the window "Outline" should be tree subnodes "greeterClient1" and "greeterGetGreeting1" (dataprovider)

    19) Result:
    a text field with text "Hello World" should appear in a web-browser.


    Approvals

    Reviewer Name & Title

    Date

    Status




    Revision History

    Author

    Date

    Revision

    Roman Mostyka

    June-02-2007

    1

    Project Features

    About this Project

    QA was started in November 2009, is owned by Jiří Kovalský, and has 97 members.
    By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
     
     
    Close
    loading
    Please Confirm
    Close