cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

XML Editor Test Specification

Author: Jiri Kovalsky
Version: 1.11.30
Last update: 30.05.2005
Introduction: This document contains procedures for testing XML editor. The xml module provides syntax highlighting, code completion and validation actions in editor.
Comment: This test specification does not cover other XML module functionality like DTD/CSS support, wizards etc.

Table of Contents

Test suite 1: Syntax highlighting

Purpose: This test suite checks that syntax highlighting in XML editor is correct.
Setup: No preparation is necessary for this test suite.

#Test caseDescription
1New XML document
  1. Use File | New Project... to create new Web Application project located in your home directory.
  2. Invoke File | New File... from main menu.
  3. Select XML category and XML Document as file type. Push Next >.
  4. Type diary into File Name, change Folder field to src\java and press Next >.
  5. Let Well-formed Document option selected and press Finish.
RESULT:New diary.xml file is opened in editor containing only <root> and </root> elements. The file is created under Source Packages | <default package> node.
2Syntax highlighting
  1. Copy whole content of this document into clipboard.
  2. Press CTRL+A in the editor and then click Edit | Paste from main menu.
  3. Editor should replace its content with text from clipboard. Compare the syntax highlighting with this picture.
RESULT:Proper colors should be used for tags (blue), attributes (green), values (pink), comments (dark green), plain text (black) and metadata (dark blue).
Invalid data section is highlighted in redcolor.

Test suite 2: Validation

Purpose: This test suite checks that it is possible to check structure and contents of XML file.
Setup: No preparation is necessary for this test suite except having a web project open with diary.xml file.

#Test caseDescription
1Check structure
  1. Right click editor area and choose Check XML from popup menu.
  2. One error at line 7 must be reported in Output - XML check window.
  3. Click Comment must start with "<!--. [7] link. It should highlight the line 7 in editor and move cursor there.
  4. Delete line 7 and repeat step 1.
RESULT:XML checking must finish successfully without any error.
2Create DTD
  1. Right click editor area and choose Generate DTD... from popup menu.
  2. Push OK in follow-up dialog.
RESULT:New diary.dtd file is opened in editor containing definitions for week and day elements.
3Validate contents
  1. Switch to diary.xml editor tab, right click editor area and choose Validate XML from popup menu.
  2. One error at line 4 must be reported in Output - XML check window.
  3. Click cvc-elt.1: Cannot find the declaration of element 'week'. [4] link. It should highlight the line 4 in editor and move cursor there.
  4. Type <!DOCTYPE week SYSTEM "diary.dtd"> at line 2 and repeat step 1.
RESULT:No error shows up in Output - XML check window and XML file validates successfully.

Test suite 3: Code completion

Purpose: This test suite checks that code completion in XML editor is working correctly.
Setup: No preparation is necessary for this test suite except having a web project open with diary.xml and diary.dtd files.

#Test caseDescription
1Tags completion
  1. Switch to diary.dtd editor tab and replace CDATA by (2004|2005) in definition of year attribute at line 23.
  2. Type <!ENTITY boolean "true|false"> at last line 32 and Save the diary.dtd file.
  3. Switch back to diary.xml editor tab. Add new line at end of the file and type <.
  4. Press CTRL+Space. Two suggestions day and week show up.
  5. Type w which should leave only week in the list of suggestions. Press Enter.
RESULT:Now you should have <week written at last line.
2Attributes completion
  1. Press Space and invoke code completion by CTRL+Space again.
  2. Two attributes must show up id and year.
  3. Use Arrow Down to select year and press Enter.
RESULT:Now you should have <week year=" written at last line.
3Values completion
  1. Press Enter to create new line and press Arrow Left so that cursor is not at last line. Once issue #59337 is fixed this step will not be necessary.
  2. Press CTRL+Space to invoke code completion.
  3. Press Enter and type "> to complete the tag.
RESULT:Now you should have <week year="2004"> written at last line.
4Contex awareness
  1. Press Enter, type < and press CTRL+Space to invoke code completion.
  2. Only two items should show up day and /week.
  3. Type / character.
RESULT:Closing tag must be automatically completed so that you have </week> now.
5Entities completion
  1. Type & and wait for code completion.
  2. 6 items will be suggested including boolean entity.
  3. Type a which should reduce the list to only apos and amp items. Press Enter
RESULT:apos; should be automatically completed so that you have </week>&apos; at last line 10 now.

Generated: 2005 05 30 12:13
Companion
Projects:
MySQL Database Server   GlassFish Community: an Open Source Application Server   Open Solaris  Open JDK: an Open SourceJDK   Mobile & Embedded Community     Sponsored by 
Sponsored by Sun Microsystems