Tag Library Editor Test Specification
Author: Jindrich Sedek
Version: 1.14
Last update: 22.06.2006
Introduction:
This document contains procedures for testing tag library editor. The taglibed module provides syntax highlighting, code completion and validation actions in editor. Besides, both new tag file and tag handler wizards can update contents of the library.
Comment:
Table of Contents
|
Purpose:
This test suite checks that syntax highlighting in tag library editor is correct.
Setup: No preparation is necessary for this test suite.
| # | Test case | Description |
| 1 | New tag library descriptor |
-
Use File | New Project... to create new Web Application project located in your home directory.
- Invoke File | New File... from main menu.
-
Select Web category and Tag Library Descriptor as file type. Push Next >.
-
Type library into TLD Name, wizard should modify URI and Prefix fields. Press Finish.
|
|
| RESULT: |
New library.tld file is opened in editor and both <short-name> and <uri> tags contain values specified in the wizard.
|
|
|
test / NewProjectWizardsTest.java ; testDefaultNewWebModWizard()
|
|
| 2 | Syntax highlighting |
-
Open library.tld tag library descriptor node in editor.
- 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).
|
|
|
|
Purpose:
This test suite checks that code completion in tag library editor is working correctly.
Setup:
No preparation is necessary for this test suite except having a web project open with library.tld file.
test / testTagLibraryCompletion.tld
| # | Test case | Description |
| 1 | Tags completion |
-
Add new line at end of the file and type <.
- Press CTRL+Space. Long list of 43 suggestions appear.
-
Type tag which should reduce list of suggestions to tag-file, tag-class, taglib, tag-extension and taglib-extension.
-
Using Arrow Down key select tag-extension finally and press Enter.
|
|
| RESULT: |
Now you should have <tag-extension written at last line.
|
|
| 2 | Attributes completion |
- Press Space and invoke code completion by CTRL+Space again.
-
Two attributes must show up id and namespace.
- Select id and press Enter.
|
|
| RESULT: |
Now you should have <tag-extension id="" written at last line.
|
|
| 3 | End tag completion |
-
Type 1"> to have the tag completed <tag-extension id="1">.
-
Editor should show code completion window with end tag </tag-extension>. Press Enter.
-
End tag </tag-extension> should be added and cursor should be set between start tag and end tag. Press Enter .
|
|
| RESULT: |
|
Closing tag must be moved two lines lower. Cursor should be between starting and closing tag one tab to the right.
|
|
|
|
| 4 | Context awareness |
-
Remove the line number 26 containg </tag-extension>.
-
On the last line type < and press Ctrl+Space to invoke code completion.
-
Only two items should show up extension-element and /tag-extension.
- Type / character and press Enter.
|
|
| RESULT: | Closing tag must be automatically completed. |
|
| 5 | Entities completion |
- Type & and wait for code completion.
- 5 items will be suggested. Type a.
-
This should reduce the list to only amp and apos items. Press Enter.
|
|
| RESULT: | & should be automatically completed. |
|
|
|
Purpose:
This test suite checks that it is possible to check structure and contents of tag library descriptor file.
Setup:
No preparation is necessary for this test suite except having a web project open with library.tld file.
| # | Test case | Description |
| 1 | Check structure |
-
Delete both lines 24 and 25 so that file ends with </taglib> and replace <uri> at line 5 by <link>.
- Right click editor area and choose Check XML from popup menu.
- One error at line 5 must be reported in Output - XML check window.
-
Click The element type "link" ... link. It should highlight the line 5 in editor and move cursor there.
- Use CTRL+Z to undo the change in step 1 and repeat step 2.
|
|
| RESULT: | XML checking must finish successfully without any error. |
|
| 2 | Validate contents |
- Right click editor area and choose Validate XML from popup menu.
-
No error must show up in Output - XML check window and library descriptor must validate successfully.
-
Now replace <uri> at line 5 by <link> and repeat step 1.
|
|
| RESULT: |
Two errors must show up as a result of the validation. One is complaint about invalid <link> element and one is the same error as in previous test case.
|
|
|
|
Purpose:
This test suite checks that it is possible to register newly created tag file or tag handler in tag library descriptor.
Setup:
No preparation is necessary for this test suite except having a web project open with library.tld file.
| # | Test case | Description |
| 1 | New tag file |
- Invoke File | New File... from main menu.
-
Select Web category and Tag File as file type. Push Next >.
-
Type buttons into Tag File Name and check Add Tag File to Tag Library Descriptor option.
-
Use Browse... to select WEB-INF/tlds/library.tld as TLD File.
- Modify Tag Name field and press Finish button.
|
|
| RESULT: |
New entry <tag-file> must be added to tag library descriptor. Both <name> and <path> tags must contain values specified in the wizard.
|
|
| 2 | New tag handler |
- Invoke File | New File... from main menu.
-
Select Web category and Tag Handler as file type. Push Next >.
- Set Class Name field to person and check BodyTagSupport.
-
Press Next > and use Browse... to select WEB-INF/tlds/library.tld as TLD File.
- Press New... and set age as Attribute Name.
-
Select int as Attribute Type and check required attribute option.
-
Check value evaluated at JSP translation time option and press OK. Press Finish finally.
|
|
| RESULT: |
New entry <tag> must be added to tag library descriptor. All tags <name>, <tag-class>, <body-content> and <attribute> must contain values specified in the wizard. Besides, all subtags <name>, <required> and <type> must also contain values specified when creating the attribute. This picture shows correct result of this test suite.
|
|
| 3 | Invalid library |
- Delete line 24 to invalidate tag handler registered in previous test case.
- Invoke New | Tag File... on Web Pages node.
-
Type window to Tag File Name and check Add Tag File to Tag Library Descriptor option.
-
Use Browse... to set TLD File to WEB-INF/tlds/library.tld and press Finish
|
|
| RESULT: |
New tag file must be created, it should be registered in tag library descriptor and the tag library should be corected - deleted line should be added again.
|
|
|
Generated: 2006 09 13 11:35