TS 60 DDEditor

Deployment Descriptor Editor Test Specification for NetBeans 6.0

Author: Radim Roska,Dan Kolar
Version: 1.3
Last update: 1.10.2007
Introduction: This document contains procedures for testing deployment descriptor editor. It provides graphic configuration for web.xml file.
Comments:

Contents


Test suite: General view of visual editor

Purpose: Edit elements in General View of visual deployment descriptor editor.
Setup: No preparation is necessary for this test suite.

  1. General section
    1. Open Deployment Descriptor (web.xml) Editor. Select General section in General View.
    2. Change Display Name, Description, Distributable checkbox state, Session Timeout
    • EXPECTED 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.
  1. Context Parameters section
    1. Setup: Open Deployment Descriptor (web.xml) Editor. Select Context Parameters section in General View.
    2. Modify context parameters:
      1. Add - opens Add Parameter dialog, adds parameter to the table
      2. Edit - opens Edit Parameter dialog, changes selected parameter in the table
      3. Remove - removes parameter from the table
    3. Change context parameter Param Name, Param Value and Description.
    • EXPECTED 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).
  1. Web Application Listeners section
    1. Open Deployment Descriptor (web.xml) Editor. Select Web Application Listeners section in General View.
    2. Modify Web Application Listeners:
      1. Add - opens Add Listener dialog, adds listener to the table
      2. Edit - opens Edit Listener dialog, changes selected listener in the table
      3. Remove - removes listener from the table
    3. Change Listener Class and Description
    4. Browse Listener Class in dialog (press Browse button)
    • EXPECTED 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: Servlets view of visual editor

Purpose: Edit elements in Servlets View of visual deployment descriptor editor.
Setup: No preparation is necessary for this test suite.

  1. Add servlet
    1. Open Deployment Descriptor (web.xml) Editor. Select Servlets View.
    2. Press Add Servlet Element button
    3. Change Servlet Name, Servlet Class, Description, URL Pattern(s), JSP File
    4. Browse Servlet Class in dialog (press Browse button), JSP File in dialog (press Browse button)
    • EXPECTED 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: 1. Servlet Name is empty 2. Servlet Name already exists (duplicit servlet name) 3. Neither Servlet Class nor JSP File is empty 4. Both Servlet Class and JSP File are empty

  1. Edit servlet
    1. Open Deployment Descriptor (web.xml) Editor. Select a servlet in Servlets View.
    2. Change Servlet Name, Startup Order, Description, Servlet Class, JSP File, URL Pattern(s), Param Name, Param Value and Description of Initialization Parameter
    3. Switch Servlet Class and JSP File
    4. Browse Servlet Class and JSP File in dialog (press Browse__ button)
    5. Open source of JSP File in editor (press JSP File link)
    6. Modify Initialization Parameters:
      1. Add - opens Add Initialization Parameter dialog, adds parameter to the table
      2. Edit - opens Edit Initialization Parameter dialog, changes selected parameter in the table
      3. Remove - removes Initialization Parameter from the table
    7. Change context parameter Param Name, Param Value and Description.
    • EXPECTED RESULT:
      Appropriate values are changed in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
      

Fixing dialog has to appear when: 1. Servlet Name is empty 2. Servlet Name already exists (duplicit servlet name) 3. Startup Order has non integral value 4. Servlet Class is selected and Servlet Class is empty 5. 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).

  1. Remove servlet
    1. Press Remove button for a servlet.
    • EXPECTED 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: Filters view of visual editor

Purpose: Edit elements in Filters View of visual deployment descriptor editor.
Setup: No preparation is necessary for this test suite.

  1. Add filter
    1. Open Deployment Descriptor (web.xml) Editor. Select Filters section in Filters View.
    2. Press Add Filter Element button
    3. Change Filter Name, Filter Class, Description
    4. Browse Filter Class in dialog (press Browse button)
    • EXPECTED 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: 1. Filter Name is empty 2. Filter Name already exists (duplicit Filter name) 3. Filter Class is empty

  1. Edit filter
    1. Open Deployment Descriptor (web.xml) Editor. Select a filter in Filters section of Filters View.
    2. Change Filter Name, Description, Filter Class, JSP File, URL Pattern(s), Param Name, Param Value and Description of Initialization Parameter
    3. Switch Servlet Class and JSP File
    4. Browse Filter Class in dialog (press Browse__ button)
    5. Open source of Filter Class in editor (press JSP File link)
    6. Modify Initialization Parameters:
      1. Add - opens Add Initialization Parameter dialog, adds parameter to the table
      2. Edit - opens Edit Initialization Parameter dialog, changes selected parameter in the table
      3. Remove - removes Initialization Parameter from the table
    7. Change context parameter Param Name, Param Value and Description.
    • EXPECTED RESULT:
      Appropriate values are changed in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
      

Fixing dialog has to appear when: 1. Filter Name is empty 2. 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).

  1. Remove filter
    1. Press Remove button for a filter.
    • EXPECTED RESULT: Confirmation dialog has to appear. Appropriate filter, filter-mapping entries are deleted in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
  1. Edit filter mapping
    1. Open Deployment Descriptor (web.xml) Editor. Select a filter mapping in Filter Mappings of Filters View.
    2. Press Edit button
    3. Change Filter Name(if there are more than 2 filters defined), URL Pattern, Servlet Name (if there are any servlets defined in Servlets View), Dispatcher Types (check/uncheck some checkboxes of the types)
    4. Switch URL Pattern and Servlet Name
    • EXPECTED 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.
  1. Add filter mapping
    1. Open Deployment Descriptor (web.xml) Editor. Select a filter mapping in Filter Mappings of Filters View.
    2. Press Add button
    3. Change Filter Name(if there are more than 2 filters defined), URL Pattern, Servlet Name (if there are any servlets defined in Servlets View), Dispatcher Types (check/uncheck some checkboxes of the types)
    4. Switch URL Pattern and Servlet Name
    • EXPECTED 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: 1. There are no any filters defined.

2. URL Pattern is selected and URL Pattern is empty
  1. Remove filter mapping
    1. Select filter mapping in the table
    2. Press Remove button
    • EXPECTED RESULT: Appropriate filter-mapping entry is deleted in XML view. Values are preserved by saving and closing Deployment Descriptor editor.


Test suite: Pages view of visual editor

Purpose: Edit elements in Pages View of visual deployment descriptor editor.
Setup: No preparation is necessary for this test suite.

  1. Welcome Files section
    1. Open Deployment Descriptor (web.xml) Editor. Select Welcome Files section of Pages View.
    2. Edit Welcome Files
    3. Browse Welcome Files in dialog (press Browse button)
    4. Open sources of Welcome Files in editor (press Go To Source(s) link)
    • EXPECTED 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:
      1. Add - opens Add Error Page dialog, adds error page to the table
      2. Edit - opens Edit Error Page dialog, changes selected error page in the table
      3. Remove - removes error page from the table
    2. Browse Error Page Location in dialog (press Browse button)
    3. Change Error Code and Exception Type
    • EXPECTED 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 1. Error Page Location is empty 2. Error Code is not empty and has non integral value 3. Neither Error Code nor Exception Type is empty

4. Both Error Code and Exception Type are empty
  1. Add JSP Property Group
    1. Open Deployment Descriptor (web.xml) Editor. Select JSP Property Groups section of Pages View.
    2. Press Add JSP Property Group button
    3. Change Display Name
    4. Change Description
    5. Change URL Pattern(s)
    6. Browse URL Pattern in dialog (press Browse button)
    • EXPECTED 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).
  1. Edit JSP Property Group
    1. Setup: Open Deployment Descriptor (web.xml) Editor. Select a JSP property group in JSP Property Groups section of Pages View.
    2. Change Display Name
    3. Change Description
    4. Change URL Pattern(s)
    5. Browse URL Pattern(s) in dialog (press Browse button)
    6. Open sources of URL pattern(s) in editor (press Go To Source(s) link)
    7. Change Page Encoding
    8. Change Ignore Expression Language checkbox state
    9. Change Ignore Java Script checkbox state
    10. Change XML Syntax checkbox state
    11. Change Include Preludes (Headers)
    12. Browse Include Preludes (Headers) in dialog (press Browse button)
    13. Open sources of Include Preludes (Headers) in editor (press) Go To Sources(s) link)
    14. Change Include Codas (Footers)
    15. Browse Include Codas (Footers) in dialog (press Browse button)
    16. Open sources of Include Preludes (Headers) in editor (press) Go To Sources(s) link)
    • EXPECTED 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.
  1. Remove JSP Property Group
    1. Open Deployment Descriptor (web.xml) Editor. Select a JSP Property Group in JSP Property Groups section of Pages View.
    2. Press Remove button
    • EXPECTED 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: Security view of visual editor

Purpose: Edit elements in Security View of visual deployment descriptor editor.
Setup: Open Deployment Descriptor (web.xml) Editor. Select Security view.

  1. Switch None
    1. Click None switch
    • EXPECTED RESULT:The login-config entry is deleted in XML view. editor.
  2. Switch Digest
    1. Click Switch Digest
    • EXPECTED RESULT: Appropriate values are changed in XML view. Values are preserved by saving and closing Deployment Descriptor editor.
  3. Client Certificate switch
    1. Click Client Certificate Switch
    • EXPECTED 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 Realm Name
    • EXPECTED 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 Form Login Page either by filling field, or by Browse button
    3. Change Form Error Page either by filling field, or by Browse button
    • EXPECTED 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
    • EXPECTED 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
    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
    • EXPECTED RESULT: Appropriate values are changed in XML view. Values are preserved by saving and closing Deployment Descriptor editor.


Test suite: XML view of editor

Purpose: Edit in XML View of deployment descriptor editor. Setup: Open Deployment Descriptor (web.xml) Editor. Select XML View.

  1. XML editor functions
    1. Invoke code completion for some tags
    2. Use indentation on Enter
    3. Use Tab for indentation
    • EXPECTED 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).
  1. 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)
    • EXPECTED 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: All views functionality

Purpose: General usage of deployment descriptor editor. Setup: Open Deployment Descriptor (web.xml) Editor. Open any view.

  1. Save
    1. Press Ctrl-S (for save document) when document has been modified
    • EXPECTED RESULT:web.xml is saved.
  2. Changes propagation
    1. Make changes in visual views (non XML views)
    2. Make changes in XML view.
    • EXPECTED RESULT:

All changes in visual views have to propagate to XML View.

All changes in XML View have to propagate to visual views.
  1. 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.
    • EXPECTED RESULT: Visualization and focus change as expected.
  2. Add Servlet/Filter/Listener using wizards
    1. Create Servlet, Filter and Web Application Listener using wizards (File | New File | Web) when
      1. web.xml is closed
      2. web.xml is opened in XML View and is not modified
      3. web.xml is opened in visual view (non XML View) and is not modified
      4. web.xml is opened in XML View and is modified
      5. web.xml is opened in visual view (non XML View) and is modified
    • EXPECTED 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.
  1. 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
      1. web.xml is closed
      2. web.xml is opened in XML View and is not modified
      3. web.xml is opened in visual view (non XML View) and is not modified
      4. web.xml is opened in XML View and is modified
      5. web.xml is opened in visual view (non XML View) and is modified
    • EXPECTED 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.
  1. Delete Servlet/Filter/Listener
    1. Delete Servlet, Filter and Web Application Listener (java file's context menu Delete) when
      1. web.xml is closed
      2. web.xml is opened in XML View and is not modified
      3. web.xml is opened in visual view (non XML View) and is not modified
      4. web.xml is opened in XML View and is modified
      5. web.xml is opened in visual view (non XML View) and is modified
    • EXPECTED 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.


Test suite: Refactoring

Purpose: Check that changes made in project appear in web.xml Setup: Open Web project.

  1. Add servlet
    1. In project view right click on web application and add Servlet
    2. Specify package name and click finish.
    • EXPECTED RESULT: New servlet is in servlets and xml view in web.xml
  1. Add filters and filters mappings
    1. In filters view in web.xml click on Add Filter Element
    2. Name filter TestFilter and select created servlet through Browse dialog
    3. Ok
    4. Add Filter Mappings by add button
    5. Select in Apply to: Servlet name: you new servlet.
    • EXPECTED RESULT: Filter and filter mappings are added to web.xml ( in xml view)
  2. Add web application Listener
    1. In general view in web.xml add Listener by Addbutton
    2. Select created servlet by Browse dialog
    • EXPECTED RESULT: Listener is added to web.xml ( in xml view)
  3. Move servlet to another package
    1. Create new package ( name it testPackage ) in web project
    2. Move servlet to this new package ( right click on servlet - refactor - move )
    • EXPECTED RESULT: Package is changed in all views in web.xml.
  4. Rename package with created servlet
    1. Rename ( refactor - rename ) testPackage package to test2Package
    • EXPECTED RESULT: Package is changed in all views in web.xml.
  5. Rename servlet
    1. Rename ( refactor - rename ) servlet
    • EXPECTED RESULT: Servlet is changed in all views in web.xml.
  6. Remove servlet
    1. In project view select created servlet.
    2. Right click on servlet and select delete action.
    3. Check Safe delete(with using search) option
    4. Click Refactor
    • EXPECTED RESULT: Servlet, filter and filters mapping, listener are removed from general view,servlets view, filters view and xml view in web.xml


Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo