Purpose: Edit elements in General View of visual deployment descriptor editor.
Setup:
#
Test case
Description
1
General section
Setup: Open Deployment Descriptor (web.xml) Editor. Select General section in General View.
Change Display Name
Change Description
Change Distributable checkbox state
Change Session Timeout
RESULT:
Appropriate values are changed in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
Fixing dialog appears when Session Timeout has non integral value.
2
Context Parameters section
Setup: Open Deployment Descriptor (web.xml) Editor. Select Context Parameters section in General View.
Modify context parameters:
Add - opens Add Parameter dialog, adds parameter to the table
Edit - opens Edit Parameter dialog, changes selected parameter in the table
Remove - removes parameter from the table
Change context parameter Param Name, Param Value and Description.
RESULT:
Appropriate values are changed in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
Error message has to appear when Param Name or Param Value value is empty. User cannot enter invalid values (OK is disabled).
3
Web Application Listeners section
Setup: Open Deployment Descriptor (web.xml) Editor. Select Web Application Listeners section in General View.
Modify Web Application Listeners:
Add - opens Add Listener dialog, adds listener to the table
Edit - opens Edit Listener dialog, changes selected listener in the table
Remove - removes listener from the table
Change Listener Class and Description
Browse Listener Class in dialog (press Browse button)
RESULT:
Appropriate values are changed in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
Error message has to appear when Listener Class is empty. User cannot enter invalid values (OK is disabled).
Purpose: Edit elements in Servlets View of visual deployment descriptor editor.
Setup:
#
Test case
Description
1
Add servlet
Setup: Open Deployment Descriptor (web.xml) Editor. Select Servlets View.
Press Add Servlet Element button
Change Servlet Name
Change Servlet Class
Browse Servlet Class in dialog (press Browse button)
Change JSP File
Browse JSP File in dialog (press Browse button)
Change Description
Change URL Pattern(s)
RESULT:
Appropriate servlet and servlet-mapping entries are added in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
Error message has to appear when
Servlet Name is empty
Servlet Name already exists (duplicit servlet name)
Neither Servlet Class nor JSP File is empty
Both Servlet Class and JSP File are empty
2
Edit servlet
Setup: Open Deployment Descriptor (web.xml) Editor. Select a servlet in Servlets View.
Change Servlet Name
Change Startup Order
Change Description
Switch Servlet Class and JSP File
Change Servlet Class
Browse Servlet Class in dialog (press Browse button)
Open source of Servlet Class in editor (press Go To Source link)
Change JSP File
Browse JSP File in dialog (press Browse button)
Open source of JSP File in editor (press JSP File link)
Change URL Pattern(s)
Modify Initialization Parameters:
Add - opens Add Initialization Parameter dialog, adds parameter to the table
Edit - opens Edit Initialization Parameter dialog, changes selected parameter in the table
Remove - removes Initialization Parameter from the table
Change Param Name, Param Value and Description of Initialization Parameter
RESULT:
Appropriate values are changed in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
Fixing dialog has to appear when:
Servlet Name is empty
Servlet Name already exists (duplicit servlet name)
Startup Order has non integral value
Servlet Class is selected and Servlet Class is empty
JSP File is selected and JSP File is empty
Information dialog has to appear when Go To Source cannot find the file or class.
Error message in Initial Parameter dialog has to appear when Param Name or Param Value is empty. User cannot enter invalid values (OK is disabled).
3
Remove servlet
Setup: Open Deployment Descriptor (web.xml) Editor. Select a servlet in Servlets View.
Press Remove button for a servlet
RESULT:
Confirmation dialog has to appear.
Appropriate servlet, servlet-mapping and filter-mappings entries are deleted in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
Purpose: Edit elements in Filters View of visual deployment descriptor editor.
Setup:
#
Test case
Description
1
Add filter
Setup: Open Deployment Descriptor (web.xml) Editor. Select Servlet Filters section in Filters View.
Press Add Filter Element button
Change Filter Name
Change Filter Class
Browse Filter Class in dialog (press Browse button)
Change Description
RESULT:
Appropriate filter entry is added in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
Error message has to appear when
Filter Name is empty
Filter Name already exists (duplicit filter name)
Filter Class is empty
2
Edit filter
Setup: Open Deployment Descriptor (web.xml) Editor. Select a filter in Servlet Filters section of Filters View.
Change Filter Name
Change Description
Change Filter Class
Browse Filter Class in dialog (press Browse button)
Open source of Filter Class in editor (press Go To Source link)
Modify Initialization Parameters:
Add - opens Add Initialization Parameter dialog, adds parameter to the table
Edit - opens Edit Initialization Parameter dialog, changes selected parameter in the table
Remove - removes Initialization Parameter from the table
Change Param Name, Param Value and Description of Initialization Parameter
RESULT:
Appropriate values are changed in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
Fixing dialog has to appear when:
Filter Name is empty
Filter Name already exists (duplicit filter name)
Information dialog has to appear when Go To Source cannot find the class.
Error message in Initial Parameter dialog has to appear when Param Name or Param Value value is empty. User cannot enter invalid values (OK is disabled).
3
Remove filter
Setup: Open Deployment Descriptor (web.xml) Editor. Select a filter in Servlet Filters of Filters View.
Press Remove button for a filter
RESULT:
Confirmation dialog has to appear.
Appropriate filter and filter-mapping entries are deleted in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
4
Add filter mapping
Setup: Open Deployment Descriptor (web.xml) Editor. Select a filter mapping in Filter Mappings of Filters View.
Press Add button
Change Filter Name (if there are more than 2 filters defined)
Switch URL Pattern and Servlet Name
Change URL Pattern
Change Servlet Name (if there are any servlets defined in Servlets View)
Change Dispatcher Types (check/uncheck some checkboxes of the types)
RESULT:
Appropriate filter-mapping entry is added in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
Servlet Name choice is disabled when there are no any servlets defined in Servlets View.
Error message has to appear when
There are no any filters defined
URL Pattern is selected and URL Pattern is empty
5
Edit filter mapping
Setup: Open Deployment Descriptor (web.xml) Editor. Select a filter mapping in Filter Mappings of Filters View.
Press Edit button
Change Filter Name (if there are more than 2 filters defined)
Switch URL Pattern and Servlet Name
Change URL Pattern
Change Servlet Name (if there are any servlets defined in Servlets View)
Change Dispatcher Types (check/uncheck some checkboxes of the types)
RESULT:
Appropriate values are changed in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
Servlet Name choice is disabled when there are no any servlets defined in Servlets View.
Error message has to appear when
URL Pattern is selected and URL Pattern is empty
6
Remove filter mapping
Setup: Open Deployment Descriptor (web.xml) Editor. Select a filter mapping in Filter Mappings of Filters View.
Select filter mapping in the table
Press Remove button
RESULT:
Appropriate filter-mapping entry is deleted in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
Purpose: Edit elements in Pages View of visual deployment descriptor editor.
Setup:
#
Test case
Description
1
Welcome Files section
Setup: Open Deployment Descriptor (web.xml) Editor. Select Welcome Files section of Pages View.
Edit Welcome Files
Browse Welcome Files in dialog (press Browse button)
Open sources of Welcome Files in editor (press Go To Source(s) link)
RESULT:
Appropriate welcome-file-list entry is added in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
2
Error Pages section
Setup: Open Deployment Descriptor (web.xml) Editor. Select Error Pages section of Pages View.
Modify Error Pages:
Add - opens Add Error Page dialog, adds error page to the table
Edit - opens Edit Error Page dialog, changes selected error page in the table
Remove - removes error page from the table
Browse Error Page Location in dialog (press Browse button)
Change Error Code and Exception Type
RESULT:
Appropriate error-page entries are changed in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
Error message has to appear (and user cannot enter invalid values, i.e. OK is disabled) when
Error Page Location is empty
Error Code is not empty and has non integral value
Neither Error Code nor Exception Type is empty
Both Error Code and Exception Type are empty
3
Add JSP Property Group
Setup: Open Deployment Descriptor (web.xml) Editor. Select JSP Property Groups section of Pages View.
Press Add JSP Property Group button
Change Display Name
Change Description
Change URL Pattern(s)
Browse URL Pattern in dialog (press Browse button)
RESULT:
Appropriate jsp-property-group entry is added in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
Error message has to appear when URL Pattern(s) is empty. User cannot enter invalid values (OK is disabled).
4
Edit JSP Property Group
Setup: Open Deployment Descriptor (web.xml) Editor. Select a JSP property group in JSP Property Groups section of Pages View.
Change Display Name
Change Description
Change URL Pattern(s)
Browse URL Pattern(s) in dialog (press Browse button)
Open sources of URL pattern(s) in editor (press Go To Source(s) link)
Change Page Encoding
Change Ignore Expression Language checkbox state
Change Ignore Java Script checkbox state
Change XML Syntax checkbox state
Change Include Preludes (Headers)
Browse Include Preludes (Headers) in dialog (press Browse button)
Open sources of Include Preludes (Headers) in editor (press) Go To Sources(s) link)
Change Include Codas (Footers)
Browse Include Codas (Footers) in dialog (press Browse button)
Open sources of Include Preludes (Headers) in editor (press) Go To Sources(s) link)
RESULT:
Appropriate jsp-property-group entry is changed in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
Fixing dialog appears when URL Pattern(s) is empty.
Information dialog has to appear when Go To Source(s) links cannot find any file.
5
Remove JSP Property Group
Setup: Open Deployment Descriptor (web.xml) Editor. Select a JSP Property Group in JSP Property Groups section of Pages View.
Press Remove button
RESULT:
Confirmation dialog has to appear.
Appropriate jsp-property-group entry is deleted in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
Purpose: Edit in XML View of deployment descriptor editor.
Setup:
#
Test case
Description
1
XML editor functions
Setup: Open Deployment Descriptor (web.xml) Editor. Select XML View.
Invoke code completion for some tags
Use indentation on Enter
Use Tab for indentation
RESULT:
Code completion works for all standard web.xml tags (according to web.xml DTD).
Editor uses general XML editor settings (from Tools | Options | Editing | Indentation Engines | XML Indentation Engine).
2
Invalid XML
Setup: Open Deployment Descriptor (web.xml) Editor. Select XML View.
Type invalid XML (wrong attribute, unfinished tag, etc.)
Type invalid web.xml (which doesn't follow web.xml's DTD - e.g. type 2 session-timeout elements of session-config)
Switch to visual view (non XML View)
RESULT:
web.xml file has to be marked by red badge icon in Projects window with error description in its tooltip.
Switching to visual view (non XML View) has to display warning dialog.
Purpose: General usage of deployment descriptor editor.
Setup:
#
Test case
Description
1
Save
Setup: Open Deployment Descriptor (web.xml) Editor. Open any view.
Press Ctrl-S (for save document) when document has been modified
RESULT:
web.xml is saved.
2
Changes propagation
Setup: Open Deployment Descriptor (web.xml) Editor. Select XML View or visual views (non XML views).
Make changes in visual views (non XML views)
Make changes in XML view
RESULT:
All changes in visual views have to propagate to XML View.
All changes in XML View have to propagate to visual views.
3
Navigation
Setup: Open Deployment Descriptor (web.xml) Editor.
Use multiview editor tabs in editor toolbar for switching between views
Use navigation combobox in visual views for focusing different part of visual view
RESULT:
Visualization and focus change as expected.
4
Add Servlet/Filter/Listener using wizards
Setup: Optionally open Deployment Descriptor (web.xml) Editor.
Create Servlet, Filter and Web Application Listener using wizards (File | New File | Web) when
web.xml is closed
web.xml is opened in XML View and is not modified
web.xml is opened in visual view (non XML View) and is not modified
web.xml is opened in XML View and is modified
web.xml is opened in visual view (non XML View) and is modified
RESULT:
Appropriate entries are added in all views.
If web.xml wasn't modified, it won't be modified after addition. If web.xml was modified, it will stay modified after addition.
5
Rename Servlet/Filter/Listener using refactoring
Setup: Optionally open Deployment Descriptor (web.xml) Editor.
Rename Servlet, Filter and Web Application Listener using refactoring (java file's context menu Refactor | Rename or Refactor | Move Class) when
web.xml is closed
web.xml is opened in XML View and is not modified
web.xml is opened in visual view (non XML View) and is not modified
web.xml is opened in XML View and is modified
web.xml is opened in visual view (non XML View) and is modified
RESULT:
Renaming of appropriate web.xml entries has to be part of refactoring (e.g. listed in Refactoring window). Appropriate entries are renamed in all views.
6
Delete Servlet/Filter/Listener
Setup: Optionally open Deployment Descriptor (web.xml) Editor.
Delete Servlet, Filter and Web Application Listener (java file's context menu Delete) when
web.xml is closed
web.xml is opened in XML View and is not modified
web.xml is opened in visual view (non XML View) and is not modified
web.xml is opened in XML View and is modified
web.xml is opened in visual view (non XML View) and is modified
RESULT:
Confirm changes dialog has to appear, select Process. Appropriate entries are deleted in all views.
If web.xml wasn't modified, it won't be modified after addition. If web.xml was modified, it will stay modified after addition.