Recommended Test Plan


The following testing guidelines help you debug your extensions. Although you may not have access to both a Macintosh and Windows system, have different versions of Netscape, and so on, follow as much of the test plan as you can. Always perform the installation and compatibility tests, no matter what kind of extension you're testing.

Be sure to test your extension in a variety of scenarios. It may work in exactly the case it was designed for, but fail miserably in any other case. Due to the scope and variety of possible extensions, this test plan does not thoroughly cover every way in which an extension can be tested , nor does it necessarily reflect the testing process that is performed at Macromedia. Treat this plan as a starting point, a minimum standard that your extension should be able to pass, and perform further tests as appropriate.

After you submit your extension to Macromedia for certification, it will be further tested by Macromedia Quality Assurance. QA will send you a list of any problems encountered ; you can then fix the problems and resubmit the extension. However, you're expected to do thorough testing before submitting the extension.

After you perform the steps listed in "Preparing to Test" and "Testing Installation," follow the appropriate test plan for your extension type. If your extension can operate on an entire site, follow the test plan for "Testing Site-Wide Extensions."

All Extensions: Preparing to Test

After completing an extension or fixing a bug, prepare to test your extension:

  1. Back up your Configuration folder.

  2. Install the extension in either of the following ways:

    • Use the Extension Manager.

    • Place the files in the appropriate subfolder in the Configuration folder.

  3. Quit and relaunch Dreamweaver if you installed without the Extension Manager, or if you are prompted to do so by the Extension Manager.

All Extensions: Testing Installation

To make sure that you can install your extension on all platforms, perform these tests for all extensions:

  1. Install on both Windows and Macintosh.

  2. Verify that the installation worked correctly. In particular:

    • Make sure all files, including Help files (if any), are installed in the proper folders.

    • Check the Dreamweaver user interface for anything that might be affected by installation, including Property inspectors, the Insert bar, and relevant menus .

  3. Run virus-checking software to verify lack of infection before and after using the extension.

Testing Objects

Perform these tests if your extension is an object.

Test the Object's User Interface
  1. Launch Dreamweaver, and open the Insert bar.

  2. Make sure the object has an icon in the Insert bar. (Every object in Dreamweaver should have a unique 18x18 pixel GIF icon.)

  3. Make sure the name of the object in the Insert menu is correct and makes sense.

  4. Move the pointer over the object icon in the Insert bar, and make sure the ToolTip indicates what the object does.

Insert the Object
  1. Insert the object using the Insert menu. If a parameter-entry dialog box appears, verify the following:

    • Default values for all fields make sense.

    • The insertion point is in the first text field by default (and the default value, if any, is selected).

    • Layout is readable and makes sense visually and logically (see "UI Guidelines for Extension Developers," available for download from Exchange).

    • Pressing Tab moves through the fields in a reasonable order.

  2. If there is a Help button in the parameter-entry dialog box, click it and verify that it does the right thing (opens an appropriate page in the Windows or Mac help utility, for example).

  3. Back in the parameter-entry dialog box, click OK to insert the object with default values.

  4. Verify that no error occurs when the default-valued object is inserted.

  5. Insert the object again, and enter nondefault values in the dialog box. Click OK to insert the object. Verify that these values are reflected in the HTML code and in the Property inspector (if there is an inspector for the object).

  6. Insert the object again, and enter invalid data in each field. Try leaving the field blank, using large or negative numbers , using invalid characters (such as /, ?, :, *, and so on), and using letters in numeric fields. Generally, you should allow the user to enter an invalid value or blank field, and doing so shouldn't cause a display problem and shouldn't crash Dreamweaver. For more information, see "UI Guidelines for Extension Developers."

Check HTML and Browser Display
  1. Using the HTML Source inspector, verify that the correct HTML was inserted.

  2. Click the object's icon in the Insert bar, and verify that the correct HTML was inserted.

  3. Drag and drop the object out of the Insert bar, and verify that the correct HTML was inserted.

  4. Preview in the following browsers, on both Windows and Macintosh (or as many of these browsers and platforms as you have access to). All objects should work properly in any 4.0 or later browser, and should either work properly or fail gracefully on any 3.0 browser.

Using the Object

Spend 1015 minutes using the object. Make sure your testing includes these tasks :

  • Run the Property inspector tests on any object that has a Property inspector.

  • Use the object with other Dreamweaver objects (insert it in a layer, a table, and so on).

  • Verify that the object's user interface is relatively intuitive and that the object works when previewed in a browser.

Testing Property Inspectors

Perform these tests if your extension is a Property inspector.

  1. Verify that the Property inspector appears when the correct kind of item is selected in either the Document window or the HTML Source inspector (and that the Property inspector doesn't appear when other items are selected).

  2. Make sure the Property inspector is visually acceptable (follow the "UI Guidelines for Extension Developers"). In particular, ensure the following:

    • The ordering and layout of items makes visual and logical sense.

    • The text is readable and large enough.

    • The text fields are long enough to accommodate the information they'll hold (for example, you should be able to see all seven characters in a text field for a color value).

  3. Make sure all important attributes of a given tag are included in the Property inspector.

  4. Click each of the Property inspector's buttons , and verify the following:

    • The color picker icons work.

    • The File browse icons work.

    • The Help button (if there is one) works.

  5. Edit values in the Property inspector, and verify that the changes are reflected in both the Document window and the HTML Source inspector.

  6. Edit values in the HTML Source inspector, and verify that the changes are reflected in both the Document window and the Property inspector.

  7. Verify that other custom Property inspectors (such as those for <head> area items such as Title ) still work. If any inspector fails to appear when it should, check your canInspectSelection() functionit's probably not specific enough.

Testing Commands

Perform these tests if your extension is a command.

For commands that are specific to an object or tag (such as Format Table):

  1. Select an appropriate object, and make sure the command is enabled in the Commands menu.

  2. Select an object that the command doesn't apply to, and make sure the command is disabled in the Commands menu.

  3. Verify that the command is enabled when the insertion point is inside the object (for objects such as layers and tables), even when not all of the object is selected.

For commands that use dialog boxes:

  1. Select an appropriate object. Choose the command from the Commands menu.

  2. Verify the following:

    • Default values for all fields make sense.

    • The insertion point appears in the first text field (and the default value, if any, is selected) by default.

    • Layout is readable and makes sense visually and logically (follow the "UI Guidelines for Extension Developers").

    • Pressing Tab moves through the fields in a reasonable order.

  3. If there is a Help button, click it, and verify that it does the right thing (opens an appropriate page in a browser, for example).

  4. Back in the dialog box, click OK to use the command with default values.

  5. Verify that no error occurs when the default-valued object is inserted.

  6. Choose the command again, and enter non-default values in the dialog box. Click OK to run the command. Verify that the values you entered are reflected in the HTML code and in the Property inspector (if there is an inspector for the object), as appropriate.

  7. Choose the command again, and enter invalid data in each field of the dialog box. Try leaving the field blank, using large or negative numbers, using invalid characters (such as /, ?, :, *, and so on), and using letters in numeric fields. Generally, you should allow the user to enter an invalid value or blank field, and doing so shouldn't cause a display problem and shouldn't crash Dreamweaver. See the user interface guidelines document for more information.

To check the command and browser display:

  1. Run the command, and verify that the command does what you expect it to.

  2. Preview as many browsers and platforms as you have access to. Any changes made by a command should appear properly in any 4.0 or later browser, and should either appear properly or fail gracefully in any 3.0 browser.

Testing Behaviors

Perform these tests if your extension is a behavior.

  1. Make sure the behavior is available in the Behavior panel and has the correct name. Also, do the following:

    • Make sure the behavior is enabled only for the appropriate browser versions in the Behavior panel's Events For pop-up menu. (For example, a layer behavior should be dimmed when Events For Netscape 3.0 is selected.)

    • If the behavior is tag-specific, make sure the behavior is enabled in the Behavior panel whenever the tag/object is selected, and that the behavior is dimmed otherwise . For example, the Go To URL behavior is enabled only if an image or layer is selected.

    • If the behavior isn't tag-specific, make sure the behavior is enabled and dimmed at the appropriate times. For example, the timeline behaviors are enabled only when there's a timeline on the page.

  2. Choose the behavior from the Behavior panel (with the proper object selected). If there's a dialog box, do the following:

    • Verify that default values for all fields make sense.

    • Verify that the insertion point appears in the first text field (and the default value, if any, is selected) by default.

    • Verify that the layout is readable and makes sense visually and logically (follow the "UI Guidelines for Extension Developers").

    • Verify that pressing Tab moves through the fields in a reasonable order.

    • If there is a Help button, click it, and verify that it does the right thing (opens an appropriate page in a browser, for example).

    • Back in the dialog box, click OK to use the behavior with default values.

    • Verify that no error occurs when the default-valued behavior is applied.

    • Verify that the default event for the behavior (such as onClick or onMouseOver ) makes sense.

    • Verify that the behavior appears in the HTML Source inspector.

    • If the behavior is added to the <head> section of the document, verify that it includes the Dreamweaver version number that the behavior was created for.

    • Choose the behavior again, and enter invalid data in each field of the dialog box. Try leaving the field blank, using large or negative numbers, using invalid characters (such as /, ?, :, *, and so on), and using letters in numeric fields. Generally, you should allow the user to enter an invalid value or blank field, and doing so shouldn't cause a display problem and shouldn't crash Dreamweaver. For more information, see "UI Guidelines for Extension Developers."

  3. Select the object you attached the behavior to, and verify in the Behavior panel that the Events and Actions columns are correctly populated .

  4. Preview as many browsers and platforms as you have access to. Any behavior should behave properly in any 4.0 or later browser, and should either behave properly or fail gracefully in any 3.0 browser.

  5. Remove the behavior from the Behavior panel, and verify that the behavior is removed from the list and from the document's code.

Testing Floating Panels

Perform these tests if your extension is a floating panel.

note

Floating panels can have a wide range of purposes; the main idea of these tests is to make sure the floating panel works as it was designed.


  1. Launch Dreamweaver, and open your floating panel.

  2. If the floating panel is supposed to be tabbed with another floating panel upon the initial launch only, verify that it is. (This doesn't happen automatically; you must code it that way yourself.)

  3. Verify the floating panel's layout:

    • The floating panel's title makes sense on the floating panel's tab and title bar, and in the Windows menu.

    • The floating panel's layout makes sense visually and logically, and conforms to the "UI Guidelines for Extension Developers."

    • Any appropriate controls resize when you resize the floating panel.

    • The context-menu arrow (top-right corner) is disabled (you can't have a context menu in a custom floating panel).

  4. The floating panel's name is checked or unchecked in the Window menu, depending on whether the floating panel is visible or not. (This doesn't happen automatically; you must code it that way yourself.)

  5. Floating panels can respond to either selection changes or document edits, so make sure the floating panel responds to the appropriate action depending on its purpose. For example:

    • Both the HTML Source inspector and the Frame panel change with both selection changes and document edits.

    • The Behavior panel changes only when you make document edits.

  6. Make changes in the floating panel (for example, if you were testing the Layer panel, you could change a layer's visibility), and verify that the changes are reflected in the Document window.

  7. If there are any buttons on the floating panel, verify that they work. If a button on the floating panel opens a dialog box:

    • Verify that default values for all fields make sense.

    • Verify that the insertion point is in the first text field (and the default value, if any, is selected) by default.

    • Verify that the layout is readable and makes sense visually and logically (follow the "UI Guidelines for Extension Developers").

    • Verify that pressing Tab moves through the fields in a reasonable order.

    • If there is a Help button, click it, and verify that it does the right thing (opens an appropriate page in a browser, for example).

    • Back in the dialog box, click OK to use the floating panel with default values.

    • Verify that no error occurs when the default-valued dialog is accepted.

    • Verify that an appropriate action occurs.

    • Click the button to display the dialog box again, and enter invalid data in each field of the dialog box. Try leaving the field blank, using large or negative numbers, using invalid characters (such as /, ?, :, *, and so on), and using letters in numeric fields. Generally, you should allow the user to enter an invalid value or blank field; doing so shouldn't cause a display problem, shouldn't cause a JavaScript error, and shouldn't crash Dreamweaver. For more information, see the "UI Guidelines for Extension Developers."

  8. Open a large document, and verify that the floating panel doesn't slow down performance. (If it does reduce performance, one possible reason could be that the script's running time is proportional to the size of the documentfor example, it might count the number of characters in the document each time you edit the document.)

Testing Site-Wide Extensions

Perform these tests if your extension features site-wide functionality.

  1. Follow the normal testing procedures for extensions of that type (commands, objects, behaviors, and so on) as detailed previously.

  2. If the extension can operate on different categories of filessuch as Current Document, All Open Documents, and Entire Siteverify that the extension works with each category.

  3. Verify that the extension provides a log that shows which files have been operated on and which haven't.

  4. Verify that the extension shows a wait cursor while running.

  5. Verify that the extension warns the author that any action run on unopened files cannot be undone.

  6. Verify that the extension handles locked files appropriately.

  7. Verify that the extension handles checked out files appropriately.



Dreamweaver MX Extensions
Dreamweaver MX Extensions
ISBN: 0735711828
EAN: 2147483647
Year: 2001
Pages: 141
Authors: Laura Gutman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net