[RSS]

DTD Editor Test Specification for

Author: Jindrich Sedek
Version: 1.18
Last update: 19.07.2006
Introduction: This document contains procedures for testing DTD editor. The xml module provides syntax highlighting, bracket matching and several generating actions in DTD editor.
Comments:

Test suite: Syntax highlighting

Purpose: This test suite checks that syntax highlighting in DTD editor is correct.
Setup: No preparation is necessary for this test suite.
  1. New DTD 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 DTD Entity as file type. Push Next >.
    4. Type diary into File Name, change Folder field to src\java\dtd and press Finish.
    • EXPECTED RESULT: New diary.dtd file is opened in editor containing only definition of <root> element and its version attribute. The file is created under Source Packages | dtd node.
  2. Syntax highlighting
    1. Copy whole content of this document into clipboard.
    2. Press CTRL+A in the editor and then invoke Edit | Paste from main menu.
    3. Editor should replace its content with text from clipboard. Compare the syntax highlighting with this picture.
    • EXPECTED RESULT: Proper colors should be used for keywords ( bold dark blue ), symbols (bold black), processing instruction targets ( dark red ), values ( pink ), comments ( dark green ), plain text ( black ) and references ( blue ). Invalid data section is highlighted in red color.

Test suite: Editor actions

Purpose: This test suite checks that all validation and generating functions work correctly.
Setup: No preparation is necessary for this test suite except having one web project open with diary.dtd file.
  1. Check DTD
    1. The diary.dtd file contains 4 errors in total.
    2. Invoke Check DTD from popup menu in editor area.
    3. The first error about unquoted string shows up in the output window. Click the ... must be a quoted string. [1] link which takes the cursor to line 1.
    4. Correct the error and repeat step 2.
    5. Go after each error and fix it according to hints mentioned in the comment below the error line.
    6. The last reported error will be about missing sub/days.dtd file.
    7. Create new days.dtd from template located in src\java\dtd\sub folder and repeat step 2 again.
    • EXPECTED RESULT: The diary.dtd checks without errors now.
  2. CSS stylesheet
    1. Right click editor area of diary.dtd file and select Generate CSS... action.
    2. Change default filename from diaryStylesheet to diary and press OK button.
    • EXPECTED RESULT: New diary.css stylesheet file gets generated and opened in editor.
  3. HTML documentation
    1. Use this file to create new time.dtd file.
    2. Right click editor area of time.dtd file and invoke Generate Documentation... from popup menu.
    3. Change default timeDocumentation file name to time and press OK button.
    • EXPECTED RESULT: New time.html page file gets generated and opened in system default browser. It contains element index and details sections with description taken from comments above each element and links for faster navigation. The result should look like this page.
  4. DOM scanner
    1. Right click editor area of time.dtd file and invoke Generate DOM Tree Scanner... from popup menu.
    2. Change default TimeScanner file name to MyTimeScanner and press OK button.
    3. New MyTimeScanner.java class file gets generated and opened in editor.
    4. Invoke Build | Compile "MyTimeScanner.java" from main menu.
    • EXPECTED RESULT: It is possible to generate DOM tree scanner class that is immediatelly compilable.
  5. SAX handler
    1. Right click editor area of time.dtd file and invoke SAX Document Handler Wizard... from popup menu.
    2. Check Propagate SAX Events to Generated Handler option and push Next >.
    3. For month element select Ignore handler type and change handler method to monthMethod . Then push Next > twice.
    4. Change handler interface to MyTimeHandler , handler implementation to MyTimeHandlerImpl and generated parser to MyTimeParser . Finally push Finish.
    5. 1 XML and 4 Java class files get generated. MyTimeHandlerImpl.java gets opened in editor.
    6. Verify that TimeSAXBindings.xml file contains <bind element='month' method='monthMethod' type='IGNORE' >
    7. Open MyTimeParser.java and verify that all methods are not empty and contain at least one method call.
    8. Finally invoke Build | Build Main Project from main menu.
    • EXPECTED RESULT: It is possible to generate DOM tree scanner class that is immediatelly compilable. This is unfortunately not working due to issue #58967.

Test suite: Big files

Purpose: This test suite checks that validation and generating functions work correctly for big files.
Setup: No preparation is necessary for this test suite.
  1. Open big DTD
    1. Save this document into Web Application/web directory.
    2. Deploy WebApplication/Web Pages in Projects view.
    3. New file xhtml1-strict.dtd should be displayed. Double click it.
    • EXPECTED RESULT: Xhtml1-strict.dtd should be opened in editor.
  2. Check big DTD
    1. Right click into the opened editor window and select Check DTD from popup menu.
    2. Error message ... (No such file or directory) [29] be shown in Output window
Click the error message link. The focus should be moved to line 29 a this line should be highlited.

    1. Remove highlited line.
    2. Repeat steps 2 to 4 until the document contains no errors.
    • EXPECTED RESULT: After 3 corrections the document should contain no errors and message DTD checking finished should be shown in Output window.
  1. CSS stylesheet in big file
    1. Right click editor area of xhtml1-strict.dtd file and select Generate CSS... action.
    2. Press OK button.
    3. New xhtml1-strictStylesheet.css stylesheet file gets generated and opened in editor.
    4. Right click xhtml1-strictStylesheet.css in Projects view and select Check CSS from popup menu.
    • EXPECTED RESULT: CSS check should finish without any problem and CSS checking finished message should be displayed on status bar.
  2. HTML documentation of DTD
    1. Right click editor area of xhtml1-strict.dtd file and invoke Generate Documentation... from popup menu.
    2. Press OK button.
    • EXPECTED RESULT: New xhtml1-strictDocumentation.html page file gets generated and opened in system default browser.
Generated: Wed Jan 17 11:55:09 CET 2007