FeaturesPluginsDocs & SupportCommunityPartners

Javadoc Test Specification

Author: Max Sauer
Version: 4.1
Last update: 2005/07/04
Introduction: Javadoc module is responsible for generating javadoc documentation for sources, helping developers to write javadoc comments correctly. It is also possible to search through generated javadoc and check results.
Comment:

Table of Contents

Test suite 1: Generating documentation

Purpose: To test functionality of javadoc module, which generates Javadoc Documentation.
Setup: Prepare a project with some javadoc comments inside. You can use the "Anagram game" sample project. (File | New Project, node Samples | General)

#Test caseDescription
1Generate Javadoc for project
  1. Open a project.
  2. Select a project node in Exlorer.
  3. From pop-up menu over the node, select "Generate Javadoc for Project".
  4. Set another Web browser as default (Tools | Options, node IDE Configuration | System | System Settings, property Web Browser)
  5. Repeat steps 2. - 3.
  6. Generate Javadoc using the menu Build | Generate Javadoc for "[project_name]".
RESULT:Proper Javadoc should be generated inside "$PROJECTHOME/dist/javadoc" and index page should be shown in IDE's default browser.
2Generate Javadoc for freeform project I
  1. In opened freeform project, invoke Generate Javadoc for Project from the pop-up menu over project node in the explorer.
  2. Check if Javadoc has been created properly.
Teardown: Close whole IDE.
RESULT:
3Generate Javadoc for freeform project II
  1. Generate project's Javadoc via Build | Generate Javadoc for "ff1".
  2. Check if Javadoc has been created properly.
RESULT:The menu entry is enabled and functional, Javadoc is proprly created and shown in IDE's default web browser.


Test suite 2: Searching documentation

Purpose: Test of javadoc search functionality.
Setup: Prepare a folder and a zip file with generated javadoc.

#Test caseDescription
1Mount documentation
  1. Invoke Tools | Java Platform Manager.
  2. Add a folder and a zip file containing javadoc documentation.
RESULT:Verify that documentation is mounted via project's properties | Libraries | Manage Platforms | Javadoc tab.
2Search in mounted documentation
  1. Open 'Javadoc Index Search' dialog - Tools | Javadoc Index Search or Shift + F1
  2. Type prefix of some identifier or whole identifier (class, interface, constructor, or method) to combo and press Enter or Find button
  3. Verify that found results are correct and all mounted filesystems were used for searching
  4. Repeat search using history of search
  5. Create such query to find many results
  6. Create such query to find one result
  7. Create such query to find no result
RESULT:Found results in mounted documentation.
3Various views
  1. Search Javadoc and list results.
  2. Sort results alphabetically.
  3. Sort results by package.
  4. Sort results by object type.
  5. verify functionality of shotcuts (Alt-N, Alt-P, Alt-T).
  6. Select action Show Source on some class and its members.
  7. Verify that source editor with selected file is opened, otherwise massage must be shown.
  8. Try to toggle the HTML viewer off.
  9. Search Javadoc.
  10. Toggle display of HTML viewer back on.
RESULT:All actions end up with appropriate results.
4Search from editor
  1. Open a source file in the Editor.
  2. Place cursor over some identifier and and press Shift+F1.
  3. Verify that Javadoc Search Tool is openned and was searching for given identifier.
  4. Select some part of identifier as block and press Shift+F1.
  5. Verify that Javadoc Search Tool is openned and was searching for selected block of text.
RESULT:Javadoc found from the inside of editor window.

Test suite 3: Auto Comment tool

Purpose: Test of Auto Comment Tool functionality - creating and correcting javadoc
Setup: Open prepared test project.

#Test caseDescription
1Open Auto Comment tool
  1. Select class node in Explorer
  2. Open Auto Comment Tool window (action 'Auto Comment' in pop-up menu Tools)
  3. Verify that all nodes displayed in left List View are correctly marked (no problem, partialy correct documentation, no documentation)
  4. Test buttons above Left List View if they turn on/off selected node types (nodes with no problem, with partialy correct documentation, nodes with no documentation) and select nodes with given access modifiers (private, package, protected, public), test all changes also on inner classes.
RESULT:Openned Auto Comment Tool
2Auto Correct button
  1. This test case continues from previous one.
  2. Select node (method) with auto correctable error (missing doc. for return type, method params, thrown exceptions)
  3. Press 'Auto Correct' button
  4. Verify that all missing tags reported in Details view were corrected in view Tags, verify also source in Editor
  5. Provide description for tags, where it's missing, press 'Refresh' button
  6. Create some tags which are wrong (non-existing params, exceptions, wrong names)
  7. Press 'Auto Correct' button
  8. Verify that all errors are corrected, verify also source in Editor
RESULT:Correctable errors in documentation are corrected.
3Correcting Javadoc I
  1. Select node with wrong javadoc comment
  2. Corect all errors listed in Details View using Auto Comment Tool and press 'Refresh' button
  3. Verify that no other errors are reported
  4. Generate Javadoc for whole project
  5. Verify that javadoc contains all information
RESULT:Javadoc documentation without errors
4Correcting Javadoc II
  1. In prepared JavadocTest.java file, select "addMouseListner" method node in the explorer.
  2. Verify in it's pop-up menu, that Tools | Correct Javadoc entry is present and enabled.
  3. Invoke Tools | Correct Javadoc.
  4. Checj if javadoc for mouseListner parameter has been added to the source.
RESULT:Javadoc added inside source.
5Comment Editor
  1. Select class node under some Java source file node
  2. Invoke Tools | Auto Commnet
  3. Modify javadoc comment, create tags and close dialog
  4. Verify that javadoc is correctly writen to source in editor
  5. Select method node under some Java source file node
  6. Repeat steps 2. - 4.
  7. Select field node under some Java source file node
  8. Repeat steps 2. - 4.
  9. Generate Javadoc for whole project.
  10. Verify that javadoc contains all information
RESULT:Commented source file using property editor for javadoc Comment

Test suite 4: Code documentation settings

Purpose: Test of all types of settings regarding Javadoc module
Setup: Mount source tree and generate javadoc for it

#Test caseDescription
1Documentation settings
  1. Open test project's properties.
  2. Change some options inside Build | Documenting node, eg. window title, javadoc options and some of the checkboxes.
  3. Set Property 'Show in browser' to false.
  4. Generate javadoc.
  5. Verify that javadoc has been created properly with respect to your configuration changes inside $PROJECTHOME/dist/javadoc directory, without beeing displayed in web browser.
RESULT:Modified general documentation settings

Generated: 2005 07 04 05:12
Companion
Projects:
MySQL Database Server   Open JDK: an Open SourceJDK   GlassFish Community: an Open Source Application Server    Mobile & Embedded Community    Open Solaris   java.net - The Source for Java Technology Collaboration   Virtual Box - full virtualizer  Open ESB - The Open Enterprise Service Bus Powered by