Difference between revisions of "EJB Test Plan/Session Bean Wizard"

From Eclipsepedia

Jump to: navigation, search
(Create Session Bean with addition Business Interfaces)
(Create Session Bean with addition Business Interfaces)
Line 57: Line 57:
 
#Check if in the ''ejbModule'' source folder class TestBean2 implements the interfaces:TestBean2Local and the added interface.
 
#Check if in the ''ejbModule'' source folder class TestBean2 implements the interfaces:TestBean2Local and the added interface.
 
#Check that inherited methods and constructors are created.
 
#Check that inherited methods and constructors are created.
 +
<< add more steps >>
  
 
== << more test >> ==
 
== << more test >> ==
  
 
[[Category:WTP Testing Related| ]]
 
[[Category:WTP Testing Related| ]]

Revision as of 07:19, 3 July 2008

Functional tests for the Session Bean wizard.

Contents

Prerequisites

  • Java EE 5 compatible runtime installed: JBoss, Glassfish, etc.
  • an EAR 5 project created.

Create Default Session Bean

  1. Open the Java EE perspective.
  2. Create One EJB Project 3.0 and add it to the EAR.
  3. Create a new Session Bean:
    • for Java package enter some String that starts with a number, or has some symbols (except _ ). There should be an error: Invalid Java package name…
    • enter "test" for Java package.
    • for Class name enter some String that starts with a number, or has some symbols (except _ ). There should be an error: Invalid Java class name. Next and Finish buttons are disabled.
    • enter "TestBean" for Class name.
    • State type must be Stateless by default.
    • Check whether only "Create Business Interface > Local" is checked by default and leave it checked.
    • Session bean 01.png
    • go to next page.
    • Check whether in Business Interfaces section only TestBeanLocal interface is shown.
    • Leave the Inherited abstract methods and Constructors from superclass checkboxes checked.
    • press Finish.
  4. Create a new Stateless Session Bean:
    • enter "test" for Java package.
    • enter "TestBean" for Class name. Check that there is an error: The class already exists in the package.
    • enter "TestBean1" for name.
    • Check up Remote interface and uncheck Local interface.
    • Check whether in Business Interfaces section only TestBean1Remote interface is shown.
    • press Finish.
  5. Create a new Stateless Session Bean :
    • enter "test" for Java package.
    • enter "TestBean1_2" for Class name.
    • Check up both interfaces.
    • Press Next and check whether the names of the both interfaces are shown.
    • Session bean 02.png
    • press Finish.
  6. Check that Session Bean classes and interfaces exist in the project file structure.
  7. Verify that there is a node for the Deployment Descriptor and nodes for all the Beans under the "Session Beans" node.
  8. Check that under each node all bean classes and interfaces are listed.

<< add more steps >>

Create Session Bean with addition Business Interfaces

  1. Create a new Stateless Session Bean :
    • enter "test" for Java package.
    • enter "TestBean2" for Class name.
    • go to next page.
    • add new Business Interfaces.
    • Select one Interface and check the radio button Local, press OK.
    • Select the new interface from the Business Interface and press Remove button.
    • Press Back, and then Next again and check that this interface is not listed.
    • add new Business Interfaces as Local.
    • Leave the Inherited abstract methods and Constructors from superclass check boxes checked.
    • Session bean 03.png
    • Press Finish.
  2. Check if in the ejbModule source folder class TestBean2 implements the interfaces:TestBean2Local and the added interface.
  3. Check that inherited methods and constructors are created.

<< add more steps >>

<< more test >>