FeaturesPluginsDocs & SupportCommunityPartners

Code Navigator Test Specification

Author: Jaromir Uhrik
Version: 1.0.1
Last update: 9.6.2005
Introduction: This specification is intended as a test specification of the module Code Navigator. It reflects the functionality covered in the module UI-specification.
Comment:

Table of Contents

Test suite 1: Navigator Window

Purpose: Test navigator window appearance and correct opening shortcut, proper position.
Setup: Run IDE with clear userdir. Create or open a j2se project with some java file(s).

#Test caseDescription
1Close Navigator
1. Press the x-widget on the Navigators window.
RESULT: Navigator window disappears promptly.
2Open Navigator
1. Select main menu item Window|Navigator.
RESULT: The Navigator window appears on the left of the IDE, down from the Explorer component.
3Test Shortcut Ctrl+7
1. Close Navigator window
2. Open the navigator by keyboard shortcut Ctrl+7 (Command+7 on Mac OS).
RESULT: The Navigator window appears on the correct position of the IDE.
4Test Escape shortcut
1. Select any component of IDE (Explorer, Source Editor, Output, ...) and press Ctrl+7 (Command+7 on Mac OS).
2. Press Escape.
RESULT: The focus is on the component formerly selected component (Explorer, Source Editor, Output, ...) .
5Height Shrink
1. Decrease the navigator window height and resize it back to previous height.
RESULT: The vertical scrollbar must appear when the items are out of the visible area.
6Focus Navigator
1. Start IDE and select Navigator window.
RESULT: Navigator window is positioned on the left-bottom, down from the Explorer component.
7Width Shrink
1. Decrease the navigator window width and resize it back to previous height.
RESULT: The horizontal scrollbar must appear when some parts of items are out of the visible area.
8Hide Filters view
1. Press the button for hiding the Filter View (sticked from the top to the Filter view). The filters buttons will hide. Only the button for hiding is visible instead of the view.
2. Press the button again.
RESULT: The filter buttons will be visible again. The button for hiding of the view is visible too. All buttons are in "down" position.
Teardown:



Test suite 2: Navigator navigation

Purpose:
Setup:

#Test caseDescription
1Open file
1. Open file (click any java class in projest view - select the one where some fields and methods are contained).
RESULT: The navigator displays the list of methods and fields of the java class.
2Close file
1. Open another file. The navigator changes the content.
2. Close the edited source.
RESULT: Navigator shows again methods and fields of the currently opened source.
3Test filters
1. Press all filter-buttons down/up and see that navigator shows/hides proper fields and methods.
RESULT: The list of methods and fields in Navigator shows just the items that are allowed by selected filters.
4Switch item
1. Move throug the navigator list by cursor keys. Press enter then on any item (the mouse double-click has the same functionality so check it too).
RESULT: The item definition must be opened in the source editor and the cursor is on the begin of the line with definition. If the field/method is inherited from the parent then the parent source is opened and the proper line is scrolled and the cursor positioned there.
5Browse in source editor
1. Select a .java file with many methods and fields.
2. In source editor move cursor from the method/field to any other method or field.
RESULT: The Navigator selects the item upon the selected method/field in the source editor.
6Open non-java file
1. Open the file of the project that is not the java class (e.g. create the .xml or .html file)
RESULT: <No Java Class Selected > string appears instead of the list of methods and fields. The text is in the middle of the Navigator.
7Empty java class
1. Open the empty java class looking like this: public class NewClass { }
RESULT: The Navigator's members view shows <No Members Available> until any class or field is added into the class.
8Non-java nodes
1. Select project, package, library node in the project view.
RESULT: <No Java Class Selected> string appears in the middle of Navigator.
Teardown:



Test suite 3: Javadoc tooltips

Purpose:
Setup:

#Test caseDescription
1Show javadoc
1. Drag mouse over the Navigator.
RESULT: When the mouse is over the item in the navigator's list then the proper javadoc is opened as the bubble on the right. If the Navigator is docked on the right then the javadoc is on the left of the navigator.
2Nodes without javadoc
1. Drag mouse over the item without javadoc e.g. over member declared as "public static final int a=3;".
RESULT: Just the definition of the field/method is visible.
Teardown:



Test suite 4: Filters

Purpose:
Setup:

#Test caseDescription
1Filters Order
1. Check that the filters buttons have the following order and are in position (up=not pressed=not selected/down=pressed=selected):
  • Show inherited members - up
  • Show fields - down
  • Show static members - down
  • Show non public members - down

RESULT:
2More classes in a file
1. Create the JFrame Form with name NavigatorTest (Popup menu on package and select New|File/Folder).
2. Add JLabel into the form.
3. Replace the last line with the bracked by following code:
public class class1{
        public class1(){}
        public void print(){
            System.out.println("class1");
        }
    }
}
     class class2{    
        public class2(){}
        public void print(){
            System.out.println("class2");
        }
    }

4. Press all filters up.
RESULT: The navigator shows just these 3 items:
  • NavigatorTest
  • class1.print()
  • class1.class1
3Non Public members
1. Press down Show non public members filter
RESULT: Following items are added into the navigator:
  • initComponents()
  • class2.print()
  • class2.class2
4Static members
1. Press down Show static members filter
RESULT: main(String args) item appears in Navigator.
5Show fields
1. Press Show fields filter.
RESULT: In the navigator is new item jLabel1 JLabel.
6Browse the source
1. Move the cursor in the source editor from up to down and stop on each line.
RESULT: The selected item in navigator is changing properly when new method/field is accessed in the source editor.
7Inherited members
1. Press Show inherited members filter
RESULT: Bunch of members that are inherited appear in the Members view of Navigator. Some of them are crossed over - these items are deprecated methods.
Teardown:



Test suite 5: Inheritance view

Purpose:
Setup:

#Test caseDescription
1Parent class navigation
1. Switch Navigator to Inheritance View (through the combo above).
2. Expand the JFrame node in the navigator tree
RESULT: There are visible fields and methods of JFrame class.
2Opening source
1. Click on any method of expanded JFrame.
RESULT: The source of the JFrame is opened in source editor and it is scrolled on the method's definition and the cursor is on the header of this method.
Teardown:




Generated: Thu Jun 09 11:47:47 CEST 2005
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