Author: Lukas Jungmann
Version: 1.0.0
Last update: 14.09.2005
Introduction: Test specification for New Project and New File Wizards in J2EE area. Tests are covered mainly by automated tests in J2EE functional test suite, see: NewProjectWizardsTest, NewFileWizardsTest and J2eeProjectsTest.
Comment:
Purpose: Specifies behavior of New Project Wizard for EJB Module project.
Setup: Registered application server in IDE. Currently it can be Sun Java Application Server 8.1, JBoss 4.x or Weblogic 9.0.
#
Test case
Description
1
Choose Project Type: EJB Module
Invoke File | New Project...
Select Enterprise category and EJB Module project type, click Next
RESULT:
Appearance of New EJB Mdule wizard panel (step 2 of New Project wizard).
2
Project Name, Location, Server,...
Enter the name of new project into Project Name.
Project Location allows to select location of created project (user can use Browse... button).
Project Folder shows new project's path
Server list allows user to choose target application server for this project.
J2EE Version allows user to choose J2EE version which will be used in this project (currently only 1.4 is possible to use).
Set Source Level to 1.4 checkbox allows user to choose J2SE version used by this project. Checked by default to create portability code.
Set as Main Project checkbox allows user to set this project "as default" for build (F11), run (F5), debug (F6) and clean (Shift + F11) commands.
Back button should invoke Choose Project Type panel. Here you can choose different project type.
Cancel should close this dialog
The Help button serves to invoke help.
RESULT:
Finish button becomes enabled if there is selected some application server and if valid values for Project Name (it does not contain invalid characters, it is not existing directory within selected project location) and Project Location (it is existing directory and user has write access to it) are used.
3
Add to Enterprise application
Add to Enterprise Application list allows user to add newly created project to some existing Enterprise Application project. This Enterprise Application have to be opened in the IDE. If there's no such project opened then this list is disabled.
Press Finish button.
RESULT:
EJB Module project is created in selected location wth properties selected in the wizard. Check: Source Level in Project Properties -> Sources | Source Level, Server and J2EE version in Project Properties -> Run | Server, Main Project - project name in project tab is displayed bold and deployment descriptors (ejb-jar.xml and server specific one) are created in the src/conf directory in the project.
Purpose: Specifies behavior of New Project Wizard for Enterprise Application project.
Setup: Registered application server in IDE. Currently it can be Sun Java Application Server 8.1, JBoss 4.x or Weblogic 9.0.
#
Test case
Description
1
Choose Project Type: Enterprise Application
Invoke File | New Project...
Select Enterprise category and Enterprise Application project type, click Next
RESULT:
Appearance of New Enterprise Application wizard panel (step 2 of New Project wizard).
2
Project Name, Location, Server,...
Enter the name of new project into Project Name.
Project Location allows to select location of created project (user can use Browse... button).
Project Folder shows new project's path
Server list allows user to choose target application server for this project.
J2EE Version allows user to choose J2EE version which will be used in this project (currently only 1.4 is possible to use).
Set Source Level to 1.4 checkbox allows user to choose J2SE version used by this project. Checked by default to create portability code.
Set as Main Project checkbox allows user to set this project "as default" for build (F11), run (F5), debug (F6) and clean (Shift + F11) commands.
Back button should invoke Choose Project Type panel. Here you can choose different project type.
Cancel should close this dialog
The Help button serves to invoke help.
RESULT:
Finish button becomes enabled if there is selected some application server and if valid values for Project Name (it does not contain invalid characters, it is not existing directory within selected project location) and Project Location (it is existing directory and user has write access to it) are used.
3
Create submodules
Create EJB Module checkbox allows user to create new empty EJB module project within this Enterprise Application. It will be created using default values in subdirectory of this ear and it will use the Source Level setting selected in this wizard.
Create Web Application Module checkbox allows user to create new empty Web Application project within this Enterprise Application. It will be created using default values in subdirectory of this ear and it will use the Source Level setting selected in this wizard.
Press Finish button.
RESULT:
Enterprise Application project is created in selected location wth properties selected in the wizard. Check: Source Level in Project Properties -> Sources | Source Level, Server and J2EE version in Project Properties -> Run | Server, Main Project - project name in project tab is displayed bold and deployment descriptors (application.xml and server specific one) are created in the src/conf directory in the project. If options for creating ejb/web module were checked then these projects are created too, they are visible in project tab under <ear> | J2EE Modules node in project tab and all projects are opened in IDE.
Purpose: Specifies behavior of New File Wizard for Session Bean.
Setup: Opened or created EJB Module project.
#
Test case
Description
1
Choose File Type: Session Bean
Use popup New (select some package in Project view, show popup menu and invoke action New | File/Folder...) or invoke main menu File|New File....
Select Enterprise in Categories tree and select Session Bean in File Types list.
Push Next button.
RESULT:
Appearance of New Session Bean wizard panel (step 2 of New File wizard).
2
Choose Name & Package
Name text field allows user to write name of the created component.
Package list allows to select new class'es package.
RESULT:
If name is not valid java identifier or package name is not valid java package name, then Finish button will not become enabled.
3
Session Type
Session Type radio buttons (stateless, stateful) allows user to choose the type of the bean.
RESULT:
Created bean will be stateless/stateful as was selected. Check it in deployment descriptor.
4
Interfaces
Create Interface checkboxes allows user to select which types of interfaces will be created. At least one of the checkboxes have to be checked.
RESULT:
If none of checkboxes is selected then the Finish button in the wizard is disabled. Otherwise Finish button is enabled.
5
Finish
Finish the wizard.
RESULT:
Stateless/Stateful bean with specified name, local, remote or both interfaces is created in specified package, deployment descriptors are changed and bean impl class is opened in editor window
Purpose: Specifies behavior of New File Wizard for Entity Bean.
Setup: Opened or created EJB Module project.
#
Test case
Description
1
Choose File Type: Entity Bean
Use popup New (select some package in Project view, show popup menu and invoke action New | File/Folder...) or invoke main menu File|New File....
Select Enterprise in Categories tree and select Entity Bean in File Types list.
Push Next button.
RESULT:
Appearance of New Entity Bean wizard panel (step 2 of New File wizard).
2
Choose Name & Package
Name text field allows user to write name of the created component.
Package list allows to select new class'es package.
RESULT:
If name is not valid java identifier or package name is not valid java package name, then Finish button will not become enabled.
3
Entity Type
Primary Key Class contains the type of primary key for this bean. Must not be empty.
Persistence Type radio buttons (container, bean) allows user to choose which the type of the persistence will be used.
RESULT:
Created bean will use container/bean managed persistence as was selected and with selected primary key class. Check it in deployment descriptor and in generated classes.
4
Interfaces
Create Interface checkboxes allows user to select which types of interfaces will be created. At least one of the checkboxes have to be checked.
RESULT:
If none of checkboxes is selected then the Finish button in the wizard is disabled. Otherwise Finish button is enabled.
5
Finish
Finish the wizard.
RESULT:
CMP/BMP bean with specified name, local, remote or both interfaces is created in specified package, deployment descriptors are changed and bean impl class is opened in editor window.
Purpose: Specifies behavior of New File Wizard for Message-Driven Bean.
Setup: Opened or created EJB Module project.
#
Test case
Description
1
Choose File Type: Message-Driven Bean
Use popup New (select some package in Project view, show popup menu and invoke action New | File/Folder...) or invoke main menu File|New File....
Select Enterprise in Categories tree and select Message-Driven Bean in File Types list.
Push Next button.
RESULT:
Appearance of New Message-Driven Bean wizard panel (step 2 of New File wizard).
2
Choose Name & Package
Name text field allows user to write name of the created component.
Package list allows to select new class'es package.
RESULT:
If name is not valid java identifier or package name is not valid java package name, then Finish button will not become enabled.
3
Message-Driven Type
Destination Type radio buttons (topic, queue) allows user to choose the type of destination for messages.
RESULT:
Created bean will use topic/queue destination as was selected. Check it in deployment descriptor.
4
Finish
Finish the wizard.
RESULT:
Topic/Queue MDB with specified name is created in specified package, server resources are created setup directory, deployment descriptors are changed and bean impl class is opened in editor window.
Purpose: Specifies behavior of New File Wizard for Web Service.
Setup: Opened or created EJB Module project or Web project.
#
Test case
Description
1
Choose File Type: Web Service
Use popup New (select some package in Project view, show popup menu and invoke action New | File/Folder...) or invoke main menu File|New File....
Select Web Services in Categories tree and select Web Service in File Types list.
Push Next button.
RESULT:
Appearance of New Web Service wizard panel (step 2 of New File wizard).
2
Choose Name & Package
Name text field allows user to write name of the created component.
Package list allows to select new class'es package.
RESULT:
If name is not valid java identifier or package name is not valid java package name, then Finish button will not become enabled.
3
From scratch
Choose From scratch in Web Service Creation Type.
Push Finish button.
RESULT:
Empty Web service interface and implementation bean, webservices.xml and webservice mapping file are created, deployment descriptors are changed. Web service implementation class is opened in editor window.
Purpose: Specifies behavior of New File Wizard for Web Service.
Setup: Opened or created EJB Module project or Web project.
#
Test case
Description
1
Choose File Type: Web Service
Use popup New (select some package in Project view, show popup menu and invoke action New | File/Folder...) or invoke main menu File|New File....
Select Web Services in Categories tree and select Web Service in File Types list.
Push Next button.
RESULT:
Appearance of New Web Service wizard panel (step 2 of New File wizard).
2
Choose Name & Package
Name text field allows user to write name of the created component.
Package list allows to select new class'es package.
RESULT:
If name is not valid java identifier or package name is not valid java package name, then Finish button will not become enabled.
3
From existing sources
Choose From scratch in Web Service Creation Type and check Use existing code checkbox.
Push Next button.
RESULT:
Appearance of Select Existing Code wizard panel (step 3 of New Project wizard).
4
Select existing sources
Choose class/interface/session bean which you want to use as a base for your new web service.
Push Finish button.
RESULT:
Empty web service interface, web service implementation class with package private property of type of selected class/interface/session bean, webservices.xml and web service mapping file are created, deployment descriptors are changed. Web service implementation class is opened in editor window.
Purpose: Specifies behavior of New File Wizard for Web Service.
Setup: Opened or created EJB Module project or Web project. Optional: If you are behind the proxy server, set proxy in Tools | Options.
#
Test case
Description
1
Choose File Type: Web Service
Use popup New (select some package in Project view, show popup menu and invoke action New | File/Folder...) or invoke main menu File|New File....
Select Web Services in Categories tree and select Web Service in File Types list.
Push Next button.
RESULT:
Appearance of New Web Service wizard panel (step 2 of New File wizard).
2
Choose Name & Package
Name text field allows user to write name of the created component.
Package list allows to select new class'es package.
RESULT:
If name is not valid java identifier or package name is not valid java package name, then Finish button will not become enabled.
3
From WSDL URL
Choose From WSDL URL in Web Service Creation Type and write URL location of WSDL file you want use.
Push Finish button.
RESULT:
Web service interface and web service implementation class contain operation(s) defined in WSDL file, WSDL file is downloaded and web service mapping file and webservices.xml files are created, deployment descriptors are changed. Web service implementation class is opened in editor window.
Purpose: Specifies behavior of New File Wizard for Web Service.
Setup: Opened or created EJB Module project or Web project.
#
Test case
Description
1
Choose File Type: Web Service
Use popup New (select some package in Project view, show popup menu and invoke action New | File/Folder...) or invoke main menu File|New File....
Select Web Services in Categories tree and select Web Service in File Types list.
Push Next button.
RESULT:
Appearance of New Web Service wizard panel (step 2 of New File wizard).
2
Choose Name & Package
Name text field allows user to write name of the created component.
Package list allows to select new class'es package.
RESULT:
If name is not valid java identifier or package name is not valid java package name, then Finish button will not become enabled.
3
From local WSDL
Choose From Local WSDL file in Web Service Creation Type and select some wsdl file from your disk (you can use Browse... button).
Push Finish button.
RESULT:
Web service interface and web service implementation class contain operation(s) defined in WSDL file, WSDL file is downloaded and web service mapping file and webservices.xml files are created, deployment descriptors are changed. Web service implementation class is opened in editor window.
Purpose: Specifies behavior of New File Wizard for Web Service Client.
Setup: Opened or created Web project or J2SE project.
#
Test case
Description
1
Choose File Type: Web Service Client
Use popup New (select some package in Project view, show popup menu and invoke action New | File/Folder...) or invoke main menu File|New File....
Select Web Services in Categories tree and select Web Service Client in File Types list.
Push Next button.
RESULT:
Appearance of New Web Service Client wizard panel (step 2 of New File wizard).
2
Select options
WSDL URL text field allows user to write there URL of running web service. This text filed is enabled if user selects creating web service client for running web service.
Retrive WSDL button allows user to download WSDL file. This button is enabled if user is creating web service client for running web service.
Proxy Settings... button allows user to set the proxy server. This button is enabled if user is creating web service client for running web service.
Local Filename text field allows user to change the name of downloaded wsdl file. This text filed is enabled if user is creating web service client for running web service.
WSDL Filename text field allows user to use local wsdl file (user can use Browse... button). This text filed is enabled if user is creating web service client for web service from existing WSDL file.
Package list allows to select new class'es package.
Client Type combox allows user to choose which type of client generate.
Back button should invoke Choose File Type panel. Here you can choose different file type.
Cancel should close this dialog
The Help button serves to invoke help.
The Finish button generated web service client. This page should check, if the package name is correct and wsdl is downloaded.
Press Finish button.
RESULT:
Web service client is generated, added to web service registry and is visible under Web Service references node in project view.