cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

Javadoc Test Specification

Author: Max Sauer
Version: 5.0
Last update: 2005/09/12
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: If you find some differences between results described in this document and your results then please fill an issue or send me an email.

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
Setup:Open prepared freeform project in the IDE. (This could be done via File | New Project | General | Java Project with existing Ant Script. Follow instructions shown by the wizard.)
  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:Proper Javadoc should be generated inside "$PROJECTHOME/dist/javadoc" and index page should be shown in IDE's default browser.
3Generate Javadoc for freeform project II
Setup:Go to the freeform project directory and delete all content of it except the 'build.xml' script and 'src' directory. Start the IDE with fresh userdir, and open the freeform project using Ctrl+Shift+N | General | Java Project with existing Ant Script. Follow the wizards insructions the same way as in previous use case.
  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 properly 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. You can download J2SE 5.0 Documentation (zip file) from here.

#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
Setup:Open a project for which you've created javdoc for.
  1. Search Javadoc and list results.
  2. Sort results alphabetically.
  3. Sort results by package.
  4. Sort results by object type.
  5. Verify shortcuts functionality (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. Massage has to be shown otherwise.
  8. Try to toggle the HTML viewer off. (Alt-G or button)
  9. Search Javadoc.
  10. Toggle display of HTML viewer back on.
RESULT:All actions end up with appropriate results.
4Search from editor
Setup:Open a project for which you've created javadoc for.
  1. Open a source file in the Editor.
  2. Place carret inside of an 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 a 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 whether buttons above left List View properly switch selected node types. (nodes with no problem, with partialy correct documentation, nodes with no documentation)
  5. Test whether buttons properly switch given access modifiers (private, package (friendly) , protected, public).
  6. Verify the functionality covered by last two steps also on inner classes.
RESULT:Opened Auto Comment Tool, buttons functional. Tool should be covering inner classes.
2Auto Correct button
Setup:This test case continues from previous one.
  1. Select node with auto correctable error (missing doc. for return type, method params, thrown exceptions)
  2. Press 'Auto Correct' button
  3. Verify that all missing tags reported in Details view were corrected in view Tags, verify also source in Editor
  4. Provide description for tags where it's missing, press 'Refresh' button
  5. Create some tags which are wrong (non-existing params, exceptions, wrong names)
  6. Press 'Auto Correct' button
  7. 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. Check if javadoc for mouseListner parameter has been added to the source.
RESULT:Javadoc added inside source.
5Comment Editor
  1. Select a class node under some Java source file node
  2. Invoke Tools | Auto Comment
  3. Modify javadoc comment, create tags and close dialog
  4. Verify in editor, that javadoc is correctly writen to source.
  5. Try this both for public and 'friendly' classes.
  6. Select a method node under some Java source file node
  7. Repeat steps 2. - 4.
  8. Select a field node under some Java source file node
  9. Repeat steps 2. - 4.
  10. Generate Javadoc for whole project.
  11. Verify that javadoc contains all information
RESULT:Properly commented source file.

Test suite 4: Code documentation settings

Purpose: Testing of all settings regarding Javadoc module
Setup: Open/Create a project 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 09 12 05:12
Companion
Projects:
MySQL Database Server   GlassFish Community: an Open Source Application Server   Open Solaris  Open JDK: an Open SourceJDK   Mobile & Embedded Community     Sponsored by 
Sponsored by Sun Microsystems