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.
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 case
Description
1
Generate Javadoc for project
Open a project.
Select a project node in Exlorer.
From pop-up menu over the node, select "Generate Javadoc for Project".
Set another Web browser as default (Tools | Options, node IDE Configuration | System | System Settings, property Web Browser)
Repeat steps 2. - 3.
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.
2
Generate 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.)
In opened freeform project, invoke Generate Javadoc for Project from the pop-up menu over project node in the explorer.
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.
3
Generate 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.
Generate project's Javadoc via Build | Generate Javadoc for "ff1".
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.
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 case
Description
1
Mount documentation
Invoke Tools | Java Platform Manager.
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.
2
Search in mounted documentation
Open 'Javadoc Index Search' dialog - Tools | Javadoc Index Search or Shift + F1
Type prefix of some identifier or whole identifier (class, interface, constructor, or method) to combo and press Enter or Find button
Verify that found results are correct and all mounted filesystems were used for searching
Repeat search using history of search
Create such query to find many results
Create such query to find one result
Create such query to find no result
RESULT:
Found results in mounted documentation.
3
Various views
Setup:Open a project for which you've created javdoc for.
Purpose: Test of Auto Comment Tool functionality -- creating and correcting javadoc
Setup: Open prepared test project.
#
Test case
Description
1
Open Auto Comment tool
Select a class node in Explorer
Open Auto Comment Tool window (action 'Auto Comment' in pop-up menu Tools)
Verify that all nodes displayed in left List View are correctly marked (no problem, partialy correct documentation, no documentation)
Test whether buttons above left List View properly switch selected node types. (nodes with no problem, with partialy correct documentation, nodes with no documentation)
Test whether buttons properly switch given access modifiers (private, package (friendly) , protected, public).
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.
2
Auto Correct button
Setup:This test case continues from previous one.
Select node with auto correctable error (missing doc. for return type, method params, thrown exceptions)
Press 'Auto Correct' button
Verify that all missing tags reported in Details view were corrected in view Tags, verify also source in Editor
Provide description for tags where it's missing, press 'Refresh' button
Create some tags which are wrong (non-existing params, exceptions, wrong names)
Press 'Auto Correct' button
Verify that all errors are corrected, verify also source in Editor
RESULT:
Correctable errors in documentation are corrected.
3
Correcting Javadoc I
Select node with wrong javadoc comment
Corect all errors listed in Details View using Auto Comment Tool and press 'Refresh' button
Verify that no other errors are reported
Generate Javadoc for whole project
Verify that javadoc contains all information
RESULT:
Javadoc documentation without errors
4
Correcting Javadoc II
In prepared JavadocTest.java file, select "addMouseListner" method node in the explorer.
Verify in it's pop-up menu, that Tools | Correct Javadoc entry is present and enabled.
Invoke Tools | Correct Javadoc.
Check if javadoc for mouseListner parameter has been added to the source.
RESULT:
Javadoc added inside source.
5
Comment Editor
Select a class node under some Java source file node
Invoke Tools | Auto Comment
Modify javadoc comment, create tags and close dialog
Verify in editor, that javadoc is correctly writen to source.
Try this both for public and 'friendly' classes.
Select a method node under some Java source file node
Repeat steps 2. - 4.
Select a field node under some Java source file node
Purpose: Testing of all settings regarding Javadoc module
Setup: Open/Create a project and generate javadoc for it.
#
Test case
Description
1
Documentation settings
Open test project's properties.
Change some options inside Build | Documenting node, eg. window title, javadoc options and some of the checkboxes.
Set Property 'Show in browser' to false.
Generate javadoc.
Verify that javadoc has been created properly with respect to your configuration changes inside $PROJECTHOME/dist/javadoc directory, without beeing displayed in web browser.