FeaturesPluginsDocs & SupportCommunityPartners

Deployment Descriptor Editor Test Specification

Author: Dan Kolar
Version: 1.2
Last update: 2006/04/21
Introduction: Deployment descriptor (web.xml) visual editor in NetBeans.
Comment:

Table of Contents

Test suite 1: General view of visual editor

Purpose: Edit elements in General View of visual deployment descriptor editor.
Setup:

# Test case Description
1 General section
  1. Change Display Name
  2. Change Description
  3. Change Distributable checkbox state
  4. 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
  1. 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
  2. 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
  1. 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
  2. Change Listener Class and Description
  3. 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).

Test suite 2: Servlets view of visual editor

Purpose: Edit elements in Servlets View of visual deployment descriptor editor.
Setup:

# Test case Description
1 Add servlet
  1. Press Add Servlet Element button
  2. Change Servlet Name
  3. Change Servlet Class
  4. Browse Servlet Class in dialog (press Browse button)
  5. Change JSP File
  6. Browse JSP File in dialog (press Browse button)
  7. Change Description
  8. 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
  1. Change Servlet Name
  2. Change Startup Order
  3. Change Description
  4. Switch Servlet Class and JSP File
  5. Change Servlet Class
  6. Browse Servlet Class in dialog (press Browse button)
  7. Open source of Servlet Class in editor (press Go To Source link)
  8. Change JSP File
  9. Browse JSP File in dialog (press Browse button)
  10. Open source of JSP File in editor (press JSP File link)
  11. Change URL Pattern(s)
  12. 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
  13. 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
  1. 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.

Test suite 3: Servlets view of visual editor

Purpose: Edit elements in Filters View of visual deployment descriptor editor.
Setup:

# Test case Description
1 Add filter
  1. Press Add Filter Element button
  2. Change Filter Name
  3. Change Filter Class
  4. Browse Filter Class in dialog (press Browse button)
  5. 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
  1. Change Filter Name
  2. Change Description
  3. Change Filter Class
  4. Browse Filter Class in dialog (press Browse button)
  5. Open source of Filter Class in editor (press Go To Source link)
  6. 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
  7. 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
  1. 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
  1. Press Add button
  2. Change Filter Name (if there are more than 2 filters defined)
  3. Switch URL Pattern and Servlet Name
  4. Change URL Pattern
  5. Change Servlet Name (if there are any servlets defined in Servlets View)
  6. 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
  1. Press Edit button
  2. Change Filter Name (if there are more than 2 filters defined)
  3. Switch URL Pattern and Servlet Name
  4. Change URL Pattern
  5. Change Servlet Name (if there are any servlets defined in Servlets View)
  6. 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
  1. Select filter mapping in the table
  2. Press Remove button
RESULT: Appropriate filter-mapping entry is deleted in XML view. Values are preserved by saving and closing Deployment Descriptor editor.

Test suite 4: Pages view of visual editor

Purpose: Edit elements in Pages View of visual deployment descriptor editor.
Setup:

# Test case Description
1 Welcome Files section
  1. Edit Welcome Files
  2. Browse Welcome Files in dialog (press Browse button)
  3. 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
  1. 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
  2. Browse Error Page Location in dialog (press Browse button)
  3. 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
  1. Press Add JSP Property Group button
  2. Change Display Name
  3. Change Description
  4. Change URL Pattern(s)
  5. 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
  1. Change Display Name
  2. Change Description
  3. Change URL Pattern(s)
  4. Browse URL Pattern(s) in dialog (press Browse button)
  5. Open sources of URL pattern(s) in editor (press Go To Source(s) link)
  6. Change Page Encoding
  7. Change Ignore Expression Language checkbox state
  8. Change Ignore Java Script checkbox state
  9. Change XML Syntax checkbox state
  10. Change Include Preludes (Headers)
  11. Browse Include Preludes (Headers) in dialog (press Browse button)
  12. Open sources of Include Preludes (Headers) in editor (press) Go To Sources(s) link)
  13. Change Include Codas (Footers)
  14. Browse Include Codas (Footers) in dialog (press Browse button)
  15. 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
  1. 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.

Test suite 5: Security view of visual editor

Purpose: Edit elements in Security View of visual deployment descriptor editor.
Setup:

# Test case Description
1 Switch None
  1. Click None switch
RESULT:   The login-config entry is deleted in XML view.
2 Switch Digest
  1. Click Digest switch
RESULT: Appropriate values are changed in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
3 Switch Client Certificate
  1. Click Client Certificate switch
RESULT: Appropriate values are changed in XML view.Values are preserved by saving and closing Deployment Descriptor editor.
4 Switch Basic
  1. Click Basic switch
  2. Change Role Name
RESULT: Appropriate values are changed in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
5 Switch Form
  1. Click Form switch
  2. Change Filter Name
  3. Change Form Login Page either by filling field, or by Browse button
  4. Change Form Error Page either by filling field, or by Browse button
RESULT: Appropriate values are changed in XML view. Values are preserved by saving and closing Deployment Descriptor editor.Browse window opens and allow choosing of a page.
6 Add Security Role
  1. Press Add button
  2. Change Role Name
  3. Change URL Pattern
RESULT: Appropriate values are changed in XML view.Values are preserved by saving and closing Deployment Descriptor editor.
7
Add Security Constraint
  1. Press Add button
  2. Change Display Name
  3. Press Add button for Web Resource Collection
    1. Change Resource Name
    2. Change Description
    3. Change URL Patterns
    4. Click Selected HTTP Methods and choose some
    5.  
  4. Check Enable Authentication Constraint
    1. Change Description
    2. Press Edit button
      1. Select available Role from left column and press Add button
      2. Select used Role from right column and press Remove button
  5. Check Enable User Data Constraint
    1. Change Description
    2. Choose some choices from Transport Guarantee checkbox
RESULT: Appropriate changes are made in XML view. Values are preserved by saving and closing Deployment Descriptor editor.

Test suite 6: XML view of editor

Purpose: Edit in XML View of deployment descriptor editor.
Setup:

# Test case Description
1 XML editor functions
  1. Invoke code completion for some tags
  2. Use indentation on Enter
  3. 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
  1. Type invalid XML (wrong attribute, unfinished tag, etc.)
  2. Type invalid web.xml (which doesn't follow web.xml's DTD - e.g. type 2 session-timeout elements of session-config)
  3. 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.

Test suite 7: All views functionality

Purpose: General usage of deployment descriptor editor.
Setup:

# Test case Description
1 Save
  1. Press Ctrl-S (for save document) when document has been modified
RESULT: web.xml is saved.
2 Changes propagation
  1. Make changes in visual views (non XML views)
  2. 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
  1. Use multiview editor tabs in editor toolbar for switching between views
  2. 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
  1. 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
  1. 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
  1. 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.

Generated: 2005 06 30 01:45
Companion
Projects:
MySQL Database Server   Open JDK: an Open SourceJDK   GlassFish Community: an Open Source Application Server    Mobile & Embedded Community    Open Solaris   java.net - The Source for Java Technology Collaboration   Virtual Box - full virtualizer  Open ESB - The Open Enterprise Service Bus Powered by