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
|
Purpose: This test suite checks that syntax highlighting in XML editor is correct.
Setup: No preparation is necessary for this test suite.
| # | Test case | Description |
| 1 | New XML document |
- Use File | New Project... to create new Web Application project located in your home directory.
- Invoke File | New File... from main menu.
- Select XML category and XML Document as file type. Push Next >.
- Type diary into File Name, change Folder field to src\java and press Next >.
- 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. |
|
| 2 | Syntax highlighting |
- Copy whole content of this document into clipboard.
- Press CTRL+A in the editor and then click Edit | Paste from main menu.
- 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 | red | color. |
|
|
|
|
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 case | Description |
| 1 | Check structure |
- Right click editor area and choose Check XML from popup menu.
- One error at line 7 must be reported in Output - XML check window.
- Click Comment must start with "<!--. [7] link. It should highlight the line 7 in editor and move cursor there.
- Delete line 7 and repeat step 1.
|
|
| RESULT: | XML checking must finish successfully without any error. |
|
| 2 | Create DTD |
- Right click editor area and choose Generate DTD... from popup menu.
- Push OK in follow-up dialog.
|
|
| RESULT: | New diary.dtd file is opened in editor containing definitions for week and day elements. |
|
| 3 | Validate contents |
- Switch to diary.xml editor tab, right click editor area and choose Validate XML from popup menu.
- One error at line 4 must be reported in Output - XML check window.
- 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.
- 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. |
|
|
|
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 case | Description |
| 1 | Tags completion |
- Switch to diary.dtd editor tab and replace CDATA by (2004|2005) in definition of year attribute at line 23.
- Type <!ENTITY boolean "true|false"> at last line 32 and Save the diary.dtd file.
- Switch back to diary.xml editor tab. Add new line at end of the file and type <.
- Press CTRL+Space. Two suggestions day and week show up.
- Type w which should leave only week in the list of suggestions. Press Enter.
|
|
| RESULT: | Now you should have <week written at last line. |
|
| 2 | Attributes completion |
- Press Space and invoke code completion by CTRL+Space again.
- Two attributes must show up id and year.
- Use Arrow Down to select year and press Enter.
|
|
| RESULT: | Now you should have <week year=" written at last line. |
|
| 3 | Values completion |
- 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.
- Press CTRL+Space to invoke code completion.
- Press Enter and type "> to complete the tag.
|
|
| RESULT: | Now you should have <week year="2004"> written at last line. |
|
| 4 | Contex awareness |
- Press Enter, type < and press CTRL+Space to invoke code completion.
- Only two items should show up day and /week.
- Type / character.
|
|
| RESULT: | Closing tag must be automatically completed so that you have </week> now. |
|
| 5 | Entities completion |
- Type & and wait for code completion.
- 6 items will be suggested including boolean entity.
- 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>' at last line 10 now. |
|
|
Generated: 2005 05 30 12:13