TS 60 DTDeditor

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:

Contents


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. </span>testcase New DTD document</span>
                   Use File | New Project... to create new Web Application project located in your home directory.
               
    1. Invoke File | New File... from main menu.
                   Select XML category and DTD Entity as file type. Push Next >.
               
                   Type  diary  into File Name, change Folder field to  src\java\dtd  and press Finish.
               
    • </span>result 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.
 
  1. </span>testcase Syntax highlighting</span>
    1. Copy whole content of this document into clipboard.
                   Press CTRL+A in the editor and then invoke Edit | Paste from main menu.
               
                   Editor should replace its content with text from clipboard. Compare the syntax highlighting with  this picture.
               
    • </span>result 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.
                   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.
               
    1. Correct the error and repeat step 2.
                   Go after each error and fix it according to hints mentioned in the comment below the error line.
               
    1. The last reported error will be about missing sub/days.dtd file.
                   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.
  1. CSS stylesheet
                   Right click editor area of  diary.dtd  file and select Generate CSS... action.
               
                   Change default filename from  diaryStylesheet  to  diary  and press OK button.
               
    • EXPECTED RESULT: New diary.css stylesheet file gets generated and opened in editor.
  1. HTML documentation
    1. Use this file to create new time.dtd file.
                   Right click editor area of  time.dtd  file and invoke Generate Documentation... from popup menu.
               
                   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.
 
  1. DOM scanner
                   Right click editor area of  time.dtd  file and invoke Generate DOM Tree Scanner... from popup menu.
               
                   Change default  TimeScanner  file name to  MyTimeScanner  and press OK button.
               
    1. New MyTimeScanner.java class file gets generated and opened in editor.
    2. Invoke Build

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
                   Save this document into Web Application/web directory.
               
    1. Deploy WebApplication/Web Pages in Projects view.
    2. New file xhtml1-strict.dtd should be displayed. Double click it.
    • EXPECTED RESULT: Xhtml1-strict.dtd should be opened in editor.
  1. Check big DTD
                   Right click into the opened editor window and select Check DTD from popup menu.
               
                   Error message  ... (No such file or directory)  29   }}should 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
                   Right click editor area of  xhtml1-strict.dtd  file and select Generate CSS... action.
               
    1. Press OK button.
                   New  xhtml1-strictStylesheet.css  stylesheet file gets generated and opened in editor.
               
                   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.
                
 
  1. HTML documentation of DTD
                   Right click editor area of  xhtml1-strict.dtd  file and invoke Generate Documentation... from popup menu.
               
    1. 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

}}

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