cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

Debugger Test Specification

Author: Lubomir Cincura
Version: 4.1
Last update: 2005-05-27
Introduction: Debuggercore module provides basic framework for debugger implementations. Debuggerjpda is implementation of most common Java debugger - JPDA. Also try to invoke actions that reside on several places in the IDE (in menus, toolbars etc.) from all their locations. It is critical to perform these tests on all supported platform because the JPDA debugger uses native libraries. Several test cases needs classes not delivered with IDE, they can be found here.
Comment:

Table of Contents

Test suite 1: Menu items

Purpose: This test suite verifies if all menu items are presented on correct places.
Setup: Start NetBeans IDE with clear userdir

#Test caseDescription
1Window menu
  1. Expand menu Window from the main menu
RESULT:Menu Window contains folowing submenu items:
  • Debugging (with submenu)
    • Local Variables
    • Watches
    • Call Stack
    • Classes
    • Breakpoints
    • Sessions
    • Threads
    • Sources
2Run menu
  1. Expand menu Run from the main menu
RESULT:Menu Run contains folowing menu item:
  • Run Main Project
  • Debug Main Project
  • Test Project
  • Run File (with submenu) >
    • Run File
    • Debug File
    • Test File
    • Debug Test for File
  • Attach Debugger...
  • Finish Debugger Session
  • Pause
  • Continue
  • Step Over
  • Step Into
  • Step Out
  • Run to Cursor
  • Apply Code Changes
  • Stack (with submenu) >
    • Make Callee Current
    • Make Caller Current
    • Pop Topmost Call
  • Toggle Breakpoint
  • New Breakpoint
  • New Watch
3View menu
  1. Expand View | Toolbars menu from the main menu
RESULT:The following menu item must be presented in Toolbars menu:
  • Debug

Test suite 2: Toolbars

Purpose: Test suite verifies content of debugger toolbar
Setup: Start NetBeans IDE with clear userdir.

#Test caseDescription
1Build toolbar
  1. Open View | Toolbars and check Build menu item
Teardown: Invoke View | Toolbars and unselect Debug menu item.
RESULT:Make sure that following toolbar buttons are presented (use a hint of a particular button) in Build toolbar (* means enabled):
  • Run Main Project
  • Debug Main Project
  • Attach Debugger... *
2Debugger toolbar
  1. Invoke View | Toolbars and check Debug menu item
RESULT:Make sure that following toolbar buttons are presented (use a hint of a particular button) in Debugger toolbar (* means enabled):
  • Finish Debugger Session
  • Pause
  • Continue
  • Step Over
  • Step Into
  • Step Out
  • Run to Cursor
  • Apply Code Changes
  • New Watch... *
  • HTTP Monitor *
3Enabling actions I
  1. Open MemoryView project
RESULT:Make sure that following toolbar buttons are enabled in Build toolbar:
  • Run Main Project
  • Debug Main Project
  • Attach Debugger...
Make sure that following toolbar buttons are enabled in Debugger toolbar:
  • Step Into
  • New Watch...
  • HTTP Monitor
4Enabling actions II
  1. Open source file MemoryView.java in editor
RESULT:Make sure that following toolbar buttons are enabled in Debugger toolbar:
  • Step Into
  • Run to Cursor
  • New Watch...
  • HTTP Monitor

Test suite 3: Editor

Purpose: This test suite verifies Editor popup menu
Setup: Start NetBeans IDE with clear userdir.

#Test caseDescription
1Editor popup menu
  1. Open project MemoryView
  2. Open file MemoryView.java in editor
  3. Invoke popup menu in editor area
RESULT:Make sure that following menu items are presented:
  • Run File
  • New Watch...
  • Toggle Breakpoint

Test suite 4: Debugger views

Purpose: Tests of debugger views existence and persistence
Setup: Start NetBeans IDE with clear userdir

#Test caseDescription
1Local variables
  1. Invoke Window | Debugging | Local Variables
RESULT:Local Variables view (tab) is opened in area below the editor
2Watches
  1. Invoke Window | Debugging | Watches
RESULT:Watches view (tab) is opened in area below the editor
3Call Stack
  1. Invoke Window | Debugging | Call Stack
RESULT:Call Stack view (tab) is opened in area below the editor
4Classes
  1. Invoke Window | Debugging | Classes
RESULT:Classes view (tab) is opened in area below the editor
5Breakpoints
  1. Invoke Window | Debugging | Breakpoints
RESULT:Breakpoints view (tab) is opened in area below the editor
6Sessions
  1. Invoke Window | Debugging | Sessions
RESULT:Sessions view (tab) is opened in area below the editor
7Threads
  1. Invoke Window | Debugging | Threads
RESULT:Threads view (tab) is opened in area below the editor
8View persistence - restart debugger
  1. Start debugging session
  2. Open some debugger views from Window | Debug menu and arrange the views (try to use as many features of window system as possible)
  3. Kill debugging session
  4. Start new debugging session.
Teardown: Finish the debugger session
RESULT:Ensure all the views are opened and are arranged the same, as in first session.
9View persistence - restart IDE
  1. Open some debugger views from Window | Debug menu and arrange the views (try to use as many features of window system as possible)
  2. Restart IDE
Teardown: Close debugger views
RESULT:Ensure all the views are opened and are arranged the same, as before restart.
10Sources
  1. Invoke Window | Debugging | Sources
RESULT:Sources view (tab) is opened in area below the editor

Test suite 5: Basic functionality

Purpose: Verification of basic debugger funcionality: start, stop, stop on breakpoint, etc
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project.

#Test caseDescription
1Start debugger
  1. Invoke Debug Main Project action from menu or toolbar
Teardown: Close debugged application
RESULT:Debugger Console is opened in output. There is written 'Listening on some_port_number' followed by 'User program running' and application is started.
2Stop debugged application
  1. Invoke Debug Main Project action from menu or toolbarr, wait until debugger and application are started
  2. Finish debugged application by pressing its Close button
RESULT:'User program finished' message will be shown in the status bar and in Debugger Console.
3Kill debugged application
  1. Invoke Debug Main Project action from menu or toolbarr, wait until debugger and application are started
  2. Invoke Finish Debugger Session action from menu or toolbar
RESULT:'User program finished' message will be shown in the status bar and in Debugger Console. The debugged applcation will be closed.
4Pause debugging session
  1. Invoke Debug Main Project action from menu or toolbarr, wait until debugger and application are started
  2. Invoke Pause action from menu or toolbar
RESULT:'User program stopped' message will be shown in the status bar and in Debugger Console. The debugged application will stop responding.
5Continue debugging session
  1. Invoke Continue action from menu or toolbar
Teardown: Kill debugging session
RESULT:'User program running' message will be shown in the status bar and in Debugger Console and the debugged application will run
6Breakpoint functionality
  1. Open fle MemoryView.java in editor
  2. Place your caret on line 101
  3. Invoke Toggle Breakpoint breakpoint from editor's popup menu
  4. Invoke Debug Main Project action from menu or toolbar
Teardown: Remove the breakpoint
RESULT:Debugger will be started and after a while it will stop on line 101
7Run to cursor
  1. Place your caret on line 96
  2. Invoke Run to Cursor action from menu or toolbar
Teardown: Kill debugging session and remove breakpoint
RESULT:Debugger will run for a while and stop on line 96.
8Run to cursor - start debugging
  1. Open fle MemoryView.java in editor
  2. Place your caret on line 101
  3. Invoke Run to Cursor action from menu or toolbar
Teardown: Kill debugging session
RESULT:Debugger will start and run for a while and stop on line 101.
9Step Into - start debugging
  1. Invoke Step Into action from menu or toolbar
Teardown: Kill debugging session
RESULT:Debugger will be started and stop on the first line of main method.
10Step Into
  1. Open fle MemoryView.java in editor
  2. Place your caret on line 58
  3. Invoke Toggle Breakpoint breakpoint from editor's popup menu
  4. Invoke Debug Main Project action from menu or toolbar
  5. Wait till debugger stops on line 58
  6. Invoke Step Into action
Teardown: Kill debugging session
RESULT:Debugger will stop on line 86.
11Step Over
  1. Invoke Debug Main Project action from menu or toolbar
  2. Wait till debugger stops on line 58
  3. Invoke Step Over action
Teardown: Kill debugging session
RESULT:Debugger will stop on line 60.
12Step Out
  1. Invoke Debug Main Project action from menu or toolbar
  2. Wait till debugger stops on line 58
  3. Invoke Step Into action
  4. Wait till debugger stops on line 86
  5. Invoke Step Out action
Teardown: Kill debugging session
RESULT:Debugger will stop on line 60.
13Kill paused debugged application
  1. Invoke Debug Main Project action from menu or toolbarr, wait until debugger and application are started
  2. Invoke Pause action from menu or toolbar
  3. Invoke Finish Debugger Session action from menu or toolbar
RESULT:'User program finished' message will be shown in the status bar and in Debugger Console. The debugged applcation will be closed.

Test suite 6: Line breakpoints

Purpose: Verifies line breakpoint functionality
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open Breakpoints view.

#Test caseDescription
1Line number I
  1. Open fle MemoryView.java in editor
  2. Toggle breakpoint on line 96
  3. Select corresponding breakpoint in the Breakpoints view
  4. Invoke Customize from context menu and change Line Number property of this breakpoint to 101
  5. Invoke Debug Main Project action from menu or toolbar
Teardown: Kill debugging session and remove breakpoint
RESULT:Line 101 should be highlighted and debugger should stop on line 101 of MemoryView
2Line number II
  1. Open fle MemoryView.java in editor
  2. Toggle breakpoint on line 96
  3. Select corresponding breakpoint in the Breakpoints view
  4. Invoke Customize from context menu and change Line Number property of this breakpoint to 500
  5. Invoke Debug Main Project action from menu or toolbar
Teardown: Kill debugging session and remove breakpoint
RESULT:Ensure that no exception is thrown (MemoryView has less then 500 lines) and debugger does not stop on the breakpoint
3Print text
  1. Open fle MemoryView.java in editor
  2. Toggle breakpoint on line 96
  3. Select corresponding breakpoint in the Breakpoints view
  4. Ivoke Customize action and change Print text property of this node to "Breakpoint hit!"
  5. Invoke Debug Main Project action from menu or toolbar
Teardown: Kill debugging session and remove breakpoint
RESULT:Debugger should stop on the breakpoint after a while and message "Breakpoint hit!" should be shown in Debugger Console
4Breakpoint in method
  1. Open file LineBreakpoints.java in editor
  2. Toggle breakpoint on line 154
  3. Invoke Debug File action from context menu of the file in Projects explorer
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger will stop on the breakpoint on line 154.
5Breakpoint in static method
  1. Open file LineBreakpoints.java in editor
  2. Toggle breakpoint on line 150
  3. Invoke Debug File action from context menu of the file in Projects explorer
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger should stop on the breakpoint on line 150
6Breakpoint in initializer
  1. Open file LineBreakpoints.java in editor
  2. Toggle breakpoint on line 10
  3. Invoke Debug File action from context menu of the file in Projects explorer
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger should stop on the breakpoint on line 10
7Breakpoint in static initializer
  1. Open file LineBreakpoints.java in editor
  2. Toggle breakpoint on the line 6
  3. Invoke Debug File action from context menu of the file in Projects explorer
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger should stop on the breakpoint on line 6
8Breakpoint in constructor
  1. Open file LineBreakpoints.java in editor
  2. Toggle breakpoint on the line 158
  3. Invoke Debug File action from context menu of the file in Projects explorer
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger should stop on the breakpoint on line 158
9Breakpoint in inner class
  1. Open file LineBreakpoints.java in editor
  2. Toggle breakpoint on the line 15
  3. Invoke Debug File action from context menu of the file in Projects explorer
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger should stop on the breakpoint on line 15
10Breakpoint in anonymous inner class
  1. Open file LineBreakpoints.java in editor
  2. Toggle breakpoint on the line 37
  3. Invoke Debug File action from context menu of the file in Projects explorer
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger should stop on the breakpoint on line 37
11Breakpoint in local class
  1. Open file LineBreakpoints.java in editor
  2. Toggle breakpoint on the line 93
  3. Invoke Debug File action from context menu of the file in Projects explorer
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger should stop on the breakpoint on line 93
12Other breakpoints I
  1. Open file LineBreakpoints.java in editor
  2. Toggle breakpoint on the line 52
  3. Invoke Debug File action from context menu of the file in Projects explorer
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger should stop on the breakpoint on line 52
13Other breakpoints II
  1. Open file LineBreakpoints.java in editor
  2. Toggle breakpoint on the line 74
  3. Invoke Debug File action from context menu of the file in Projects explorer
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger should stop on the breakpoint on line 74
14Other breakpoints III
  1. Open file LineBreakpoints.java in editor
  2. Toggle breakpoint on the line 23
  3. Invoke Debug File action from context menu of the file in Projects explorer
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger should stop on the breakpoint on line 23
15Other breakpoints IV
  1. Open file LineBreakpoints.java in editor
  2. Toggle breakpoint on the line 104
  3. Invoke Debug File action from context menu of the file in Projects explorer
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger should stop on the breakpoint on line 104
16Other breakpoints V
  1. Open file LineBreakpoints.java in editor
  2. Toggle breakpoint on the line 122
  3. Invoke Debug File action from context menu of the file in Projects explorer
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger should stop on the breakpoint on line 122
17Other breakpoints VI
  1. Open file LineBreakpoints.java in editor
  2. Toggle breakpoint on line 140
  3. Invoke Debug File action from context menu of the file in Projects explorer
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger should stop on the breakpoint on line 140
18Suspend debugging - all threads
  1. Open file ThreadSuspending.java in editor
  2. Toggle breakpoint on line 38
  3. Select corresponding breakpoint in the Breakpoints view
  4. Invoke Customize from context menu and change Suspend property of this breakpoint to All threads
  5. Invoke Debug File action from context menu of the file in Projects explorer
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger will start and will hit the breakpoint. In output window some output from Thread-1 and no output from Thread-2 will be displayed.
19Suspend debugging - current thread
  1. Open file ThreadSuspending.java in editor
  2. Toggle breakpoint on line 38
  3. Select corresponding breakpoint in the Breakpoints view
  4. Invoke Customize from context menu and change Suspend property of this breakpoint to Breakpoint thread
  5. Invoke Debug File action from context menu of the file in Projects explorer
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger will start and will hit the breakpoint. In output window output from Thread-1 till counter hits 100 will be displayed and no output from Thread-2 will be displayed.
20Suspend debugging - no threads
  1. Open file ThreadSuspending.java in editor
  2. Toggle breakpoint on line 38
  3. Select corresponding breakpoint in the Breakpoints view
  4. Invoke Customize from context menu and change Suspend property of this breakpoint to No thread (continue)
  5. Invoke Debug File action from context menu of the file in Projects explorer
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger will start and will not hit the breakpoint. In output window output from Thread-1 till counter hits 100 and output from Thread-2 till counter hits 100 will be displayed. There will be 100 messages about breakpoint hit in Debugger Console.
21Go To Source
  1. Open fle MemoryView.java in editor
  2. Toggle breakpoint on line 96
  3. Close source in editor
  4. Select corresponding breakpoint in the Breakpoints view
  5. Invoke Go to Source action from the context menu of this node
Teardown: Remove breakpoint
RESULT:Source Editor should be opened with file MemoryView.java with caret on line 96
22Toggle breakpoint - main menu
  1. Open fle MemoryView.java in editor
  2. Place carret on line 45
  3. Invoke Run|Toggle Breakpoint action
Teardown: Remove the breakpoint
RESULT:Breakpoint will be created on line 45. The line will be highlighted in red and the breakpoint will be shown in Breakpoints view.
23Toggle breakpoint - context menu
  1. Open fle MemoryView.java in editor
  2. Place carret on line 45
  3. Invoke Toggle Breakpoint action from context menu of editor
Teardown: Remove the breakpoint
RESULT:Breakpoint will be created on line 45. The line will be highlighted in red and the breakpoint will be shown in Breakpoints view.
24Toggle breakpoint - gutter
  1. Open fle MemoryView.java in editor
  2. Click with mouse on editor gutter on line 45
Teardown: Remove the breakpoint
RESULT:Breakpoint will be created on line 45. The line will be highlighted in red and the breakpoint will be shown in Breakpoints view.
25Toggle breakpoint - keyboard shortcut
  1. Open fle MemoryView.java in editor
  2. Place carret on line 45
  3. Press Ctrl + F8
Teardown: Remove the breakpoint
RESULT:Breakpoint will be created on line 45. The line will be highlighted in red and the breakpoint will be shown in Breakpoints view.
26Conditional breakpoint I
  1. Toggle breakpoint on line 98
  2. Toggle breakpoint on line 101
  3. Select node Line MemoryView.java:98 and invoke Customize action from its context menu
  4. Change its Condition property to false
  5. Select node Line MemoryView.java:101 and invoke Customize action from its context menu
  6. Change its Condition property to true
  7. Invoke Debug Main Project action
Teardown: Finish debugging session and delete breakpoints
RESULT:Debugger will not stop on breakpoint on line 98. Debugger will stop on the breakpoint on line 101.
27Conditional breakpoint II
  1. Toggle breakpoint on line 98
  2. Toggle breakpoint on line 101
  3. Select node Line MemoryView.java:98 and invoke Customize action from its context menu
  4. Change its Condition property to 1 == 0
  5. Select node Line MemoryView.java:101 and invoke Customize action from its context menu
  6. Change its Condition property to 1 != 0
  7. Invoke Debug Main Project action
Teardown: Finish debugging session and delete breakpoints
RESULT:Debugger will not stop on breakpoint on line 98. Debugger will stop on the breakpoint on line 101.
28Conditional breakpoint III
  1. Toggle breakpoint on line 98
  2. Toggle breakpoint on line 101
  3. Select node Line MemoryView.java:98 and invoke Customize action from its context menu
  4. Change its Condition property to (1 == 0) || false
  5. Select node Line MemoryView.java:101 and invoke Customize action from its context menu
  6. Change its Condition property to (1 != 0) && true
  7. Invoke Debug Main Project action
Teardown: Finish debugging session and delete breakpoints
RESULT:Debugger will not stop on breakpoint on line 98. Debugger will stop on the breakpoint on line 101.
29Conditional breakpoint IV
  1. Toggle breakpoint on line 98
  2. Toggle breakpoint on line 101
  3. Select node Line MemoryView.java:98 and invoke Customize action from its context menu
  4. Change its Condition property to Boolean.FALSE.booleanValue()
  5. Select node Line MemoryView.java:101 and invoke Customize action from its context menu
  6. Change its Condition property to Boolean.TRUE.booleanValue()
  7. Invoke Debug Main Project action
Teardown: Finish debugging session and delete breakpoints
RESULT:Debugger will not stop on breakpoint on line 98. Debugger will stop on the breakpoint on line 101.
30Conditional breakpoint V
  1. Toggle breakpoint on line 98
  2. Select node Line MemoryView.java:98 and invoke Customize action from its context menu
  3. Change its Condition property to x!~10a#
  4. Invoke Debug Main Project action
Teardown: Finish debugging session and delete breakpoint
RESULT:Debugger will stop on breakpoint on line 98.
31Conditional breakpoint VI
  1. Open file LineBreakpoints.java in editor
  2. Toggle breakpoint on line 190
  3. Select node Line LineBreakpoints.java:190 and invoke Customize action from its context menu
  4. Change its Condition property to i > 10
  5. Invoke Debug Main Project action
  6. Invoke Window | Debugging | Local Variables action from context menu
Teardown: Finish debugging session and delete breakpoint
RESULT:Debugger wills top on the breakpoint after a while. Variable i in Local Variables view will have value 11.

Test suite 7: Method breakpoints

Purpose: Verifies method breakpoint functionality
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open file MemoryView.java in editor. Open Breakpoints view.

#Test caseDescription
1Pre-filled class name
  1. Put caret anywhere inside class MemoryView
  2. Invoke action Run | New Breakpoint from menu
  3. In New Brakpoint dialog set Breakpoint Type to Method
Teardown: Cancel the dialog
RESULT:Check settings in New Breakpoint dialog: Package Name will be set to examples.advaced Class Name will be set to MemoryView
2Pre-filled name of method
  1. Put caret on line 80
  2. Invoke action Run | New Breakpoint from menu
  3. In New Brakpoint dialog set Breakpoint Type to Method
Teardown: Cancel the dialog
RESULT:Check settings in New Breakpoint dialog: Package Name will be set to examples.advaced Class Name will be set to MemoryView Method Name will be set to removeNotify
3Pre-filled name of constructor
  1. Put caret on line 50
  2. Invoke action Run | New Breakpoint from menu
  3. In New Brakpoint dialog set Breakpoint Type to Method
Teardown: Cancel the dialog
RESULT:Check settings in New Breakpoint dialog: Package Name will be set to examples.advaced Class Name will be set to MemoryView Method Name will be set to MemoryView
4Pre-filled name of initializer
  1. Put caret on line 38
  2. Invoke action Run | New Breakpoint from menu
  3. In New Brakpoint dialog set Breakpoint Type to Method
Teardown: Cancel the dialog
RESULT:Check settings in New Breakpoint dialog: Package Name will be set to examples.advaced Class Name will be set to MemoryView Method Name will be set to <init>
5Method breakpoint on method
  1. Put caret on line 95
  2. Invoke action Run | New Breakpoint from menu
  3. In New Breakpoint dialog set Breakpoint Type to Method and press OK
  4. Invoke Debug Main Project action
Teardown: Kill debugging session and delete the breakpoint
RESULT:The method breakpoint Method MemoryView:updateStatus will be created and shown in Breakpoints view. The debugger will start and will stop after a while on line 86 in MemoryView.
6Method breakpoint on constructor
  1. Put caret on line 62
  2. Invoke action Run | New Breakpoint from menu
  3. In New Breakpoint dialog set Breakpoint Type to Method and press OK
  4. Invoke Debug Main Project action
Teardown: Kill debugging session and delete the breakpoint
RESULT:The method breakpoint will be created and shown in Breakpoints view. The debugger will start and will stop after a while on line 44 in MemoryView.
7Method breakpoint on initializer
  1. Put caret on line 40
  2. Invoke action Run | New Breakpoint from menu
  3. In New Breakpoint dialog set Breakpoint Type to Method and press OK
  4. Invoke Debug Main Project action
Teardown: Kill debugging session and delete the breakpoint
RESULT:The method breakpoint will be created and shown in Breakpoints view. The debugger will start and will stop after a while on line 44 in MemoryView.
8Method breakpoint on static method
  1. Put caret on line 241
  2. Invoke action Run | New Breakpoint from menu
  3. In New Breakpoint dialog set Breakpoint Type to Method and press OK
  4. Invoke Debug Main Project action
Teardown: Kill debugging session and delete the breakpoint
RESULT:The debugger will start and will stop after a while on line 236 in MemoryView.
9Method breakpoint on all methods
  1. Put caret on line 91
  2. Invoke action Run | New Breakpoint from menu
  3. In New Breakpoint dialog set Breakpoint Type to Method
  4. Check All Methods for Given Classes and press OK
  5. Invoke Debug Main Project action
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger will stop at MemoryView at line 236. After invoking Continue action it should stop on line 44, 116, 86, 73, 26, 86, 26, 86...
10Conditional method breakpoint
  1. Put caret on line 95
  2. Invoke action Run | New Breakpoint from menu
  3. In New Breakpoint dialog set Breakpoint Type to Method
  4. Set Condition proeprty to false and press OK
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger will not stop at the breakpoint
11Print text
  1. Put caret on line 91
  2. Invoke action Run | New Breakpoint from menu
  3. In New Breakpoint dialog set Breakpoint Type to Method and press OK
  4. Change Print Text to "Breakpoint Hit!".
  5. Invoke Debug Main Project action
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger will stop on the breakpoint and "Breakpoint Hit!" will be printed to the Debugger Console.

Test suite 8: Variable breakpoints

Purpose: Verifies variable breakpoint functionality
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open file MemoryView.java in editor. Open Breakpoints view.

#Test caseDescription
1Pre-filled class name
  1. Put caret anywhere inside class MemoryView
  2. Invoke action Run | New Breakpoint from menu
  3. In New Brakpoint dialog set Breakpoint Type to Variable
Teardown: Cancel dialog
RESULT:Check settings in New Breakpoint dialog: Package Name will be set to examples.advaced Class Name will be set to MemoryView
2Pre-filled field name in decalration
  1. Put caret on line 30, on column 34 to 43
  2. Invoke action Run | New Breakpoint from menu
Teardown: Cancel dialog
RESULT:Check settings in New Breakpoint dialog: Breakpoint type will be set to Variable Package Name will be set to examples.advaced Class Name will be set to MemoryView Field name will be set to msgMemory
3Pre-filled field name in code
  1. Select variable bundle on line 39 (doubleclick on the variable name or select variable name in editor)
  2. Invoke action Run | New Breakpoint from menu
Teardown: Cancel dialog
RESULT:Check settings in New Breakpoint dialog: Breakpoint type will be set to Variable Package Name will be set to examples.advaced Class Name will be set to MemoryView Field name will be set to bundle
4Stop on variable access
  1. Select variable timer on line 38 (doubleclick on the variable name or select variable name in editor)
  2. Invoke action Run | New Breakpoint from menu
  3. Ensure the Stop on is set to Variable Access and press OK
  4. Invoke Debug Main Project action
Teardown: Kill debugging session and delete the breakpoint
RESULT:The variable breakpoint Variable MemoryView.timer access will be created and shown in Breakpoints view. The debugger will start and will stop after a while on line 65 in MemoryView.
5Stop on variable modification
  1. Select variable timer on line 38 (doubleclick on the variable name or select variable name in editor)
  2. Invoke action Run | New Breakpoint from menu
  3. Ensure the Stop on is set to Variable Modification and press OK
  4. Invoke Debug Main Project action
Teardown: Kill debugging session and delete the breakpoint
RESULT:The variable breakpoint Variable MemoryView.timer modification will be created and shown in Breakpoints view. The debugger will start and will stop after a while on line 38 in MemoryView.
6Print text
  1. Select variable timer on line 38 (doubleclick on the variable name or select variable name in editor)
  2. Invoke action Run | New Breakpoint from menu
  3. Set Print text to Breakpoint Hit! and press OK
  4. Invoke Debug Main Project action
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger should stop on line 65 and "Breakpoint Hit!" should be written to the Debugger Console
7Conditional variable breakpoint
  1. Select variable timer on line 38 (doubleclick on the variable name or select variable name in editor)
  2. Invoke action Run | New Breakpoint from menu
  3. Ensure the Stop on is set to Variable Access
  4. Change Condition property to false and press OK
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger will not stop on the breakpoint.

Test suite 9: Class breakpoints

Purpose: Verifies class breakpoint functionality
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open file MemoryView.java in editor. Open Breakpoints view.

#Test caseDescription
1Pre-filled values
  1. Put caret into body of the class MemoryView
  2. Invoke action Run | New Breakpoint from menu
  3. Select Class from Breakpoint type combobox
Teardown: Cancel dialog
RESULT:Check settings in New Breakpoint dialog: Package Name will be set to examples.advaced Class Name will be set to MemoryView
2Class filter
  1. Put caret into body of the class MemoryView
  2. Invoke action Run | New Breakpoint from menu
  3. Select Class from Breakpoint type combobox
  4. Enter MemoryView* as a Class Name
  5. Set Suspend Debugging combobox to No Thread (continue)
  6. Press OK
  7. Invoke Debug Main Project action
Teardown: Kill debugging session and delete the breakpoint
RESULT:MemoryView application will be started. 7 messages of hit class breakpoint will be shown in the Debugger Console.
3Exclusion filter on
  1. Invoke action Run | New Breakpoint from menu
  2. Select Class from Breakpoint type combobox
  3. Enter java as a Package Name
  4. Enter * as a Class Name
  5. Set Suspend Debugging combobox to No Thread (continue)
  6. Ensure Exclusion Filter checkbox is unchecked
  7. Press OK
  8. Invoke Debug Main Project action
Teardown: Kill debugging session and delete the breakpoint
RESULT:Breakpoint will be hit many times by loaded classes that belong to java package. Application will be started.
4Exclusion filter off
  1. Invoke action Run | New Breakpoint from menu
  2. Select Class from Breakpoint type combobox
  3. Enter java as a Package Name
  4. Enter * as a Class Name
  5. Set Suspend Debugging combobox to No Thread (continue)
  6. Ensure Exclusion Filter checkbox is checked
  7. Press OK
  8. Invoke Debug Main Project action
Teardown: Kill debugging session and delete the breakpoint
RESULT:Breakpoint will be hit many times by loaded classes that don't belong to java package. Application will be started.
5Print text
  1. Put caret into body of the class MemoryView
  2. Invoke action Run | New Breakpoint from menu
  3. Select Class from Breakpoint type combobox
  4. Enter MemoryView* as a Class Name
  5. Change Print Text to Breakpoint Hit!
  6. Press OK
  7. Invoke Debug Main Project action
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger will stop on the breakpoint and "Breakpoint Hit!" will be written to the Debugger Console.
6Stop on main class
  1. Put caret into body of the class MemoryView
  2. Invoke action Run | New Breakpoint from menu
  3. Select Class from Breakpoint type combobox and press OK
  4. Invoke Debug Main Project action
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger will stop on breakpoint - no current program counter will be displayed and message will be in Debugger Console Class breakpoint hit for class examples.advanced.MemoryView.

Test suite 10: Exception breakpoints

Purpose: Verifies exception breakpoint functionality
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open Breakpoints view.

#Test caseDescription
1Exception breakpoint
  1. Invoke action Run | New Breakpoint from menu
  2. Select Exception from Breakpoint type combobox
  3. Enter java.lang as a Package Name
  4. Enter ClassNotFoundException as a Exception Class Name
  5. Select Caught or Uncaught from the Stop On combobox
  6. Press OK
  7. Invoke Debug Main Project action
  8. Debugger should stop on the breakpoint.
  9. Select the breakpoint in breakpoints view and invoke Customize action
  10. Change Package Name to java.io
  11. Change Exception Class Name to FileNotFoundException
  12. Invoke Continue action
Teardown: Kill debugging session and delete the breakpoint
RESULT:Breakpoint will be hit by caught FileNotFoundException.
2Stop on event
  1. Invoke action Run | New Breakpoint from menu
  2. Select Exception from Breakpoint type combobox
  3. Enter java.lang as a Package Name
  4. Enter ClassNotFoundException as a Exception Class Name
  5. Select Caught from the Stop On combobox
  6. Press OK
  7. Invoke Debug Main Project action
  8. Debugger should stop on the breakpoint
  9. Select the breakpoint in breakpoints view and invoke Customize action
  10. Select Uncaught from the Stop On combobox
  11. Invoke Continue action
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger will not stop on the breakpoint any more and application will be started
3Print text
  1. Invoke action Run | New Breakpoint from menu
  2. Select Exception from Breakpoint type combobox
  3. Enter java.lang as a Package Name
  4. Enter ClassNotFoundException as a Exception Class Name
  5. Select Caught or Uncaught from the Stop On combobox
  6. Change Print Text to Breakpoint Hit!
  7. Press OK
  8. Invoke Debug Main Project action
Teardown: Kill debugging session and delete the breakpoint
RESULT:Debugger will stop on the breakpoint and the "Breakpoint Hit!" message will be printed to the Debugger Console

Test suite 11: Thread breakpoints

Purpose: Verifies thread breakpoint functionality
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open Breakpoints view.

#Test caseDescription
1Thread breakpoint
  1. Invoke action Run | New Breakpoint from menu
  2. Select Thread from Breakpoint type combobox
  3. Select Thread Start from Set Breakpoint On combobox.
  4. Select No thread (continue) from Suspend debugging combobox
  5. Press OK
  6. Invoke Debug Main Project action
Teardown: Kill debugging session
RESULT:Breakpoint will be hit by every started thread (see messsages in Debugger Console)
2Set on event
  1. Select thread breakpoint in Breakpoints view and invoke Customize
  2. Select Thread Death from Set Breakpoint On combobox.
  3. Press OK
  4. Invoke Debug Main Project action
  5. Close MemoryView application by clicking on its Close button
Teardown: Delete breakpoint
RESULT:Breakpoint will be hit by finishing threads
3Print text
  1. Invoke action Run | New Breakpoint from menu
  2. Select Thread from Breakpoint type combobox
  3. Select Thread Start from Set Breakpoint On combobox
  4. Change Print Text to Thread {threadName} started.
  5. Select No thread (continue) from Suspend debugging combobox
  6. Press OK
  7. Invoke Debug Main Project action
Teardown: Kill debugging session and delete the breakpoint
RESULT:Breakpoint will be hit by every started thread. For each one "Thread thread_name started." will be printed to the Debugger Console.

Test suite 12: Editor annotations

Purpose: Verifies annotations - debugger and source editor interaction
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open file MemoryView.java in editor. Open Breakpoints view.

#Test caseDescription
1Breakpoint
  1. Toggle breakpoint on some line
Teardown: Delete breakpoint
RESULT:The line will be highlighted and red square will be shown on the left side of the line.
2Multiple breakpoints
  1. Toggle breakpoints on line 52 and 53
  2. Select the breakpoint on line 53 and invoke Customize
  3. Change Line Number to 52 and press OK
Teardown: Delete breakpoints
RESULT:The line 52 will be highlighted red and two red squares will be shown on the left side of the line.
3Conditional breakpoint
  1. Toggle Breakpoint on some line
  2. Select the breakpoint and invoke Customize
  3. Change Condition to "i<5" and press OK
Teardown: Delete breakpoint
RESULT:The line will be highlighted red and part of red square will be shown on the left side of the line.
4Disabled breakpoint
  1. Toggle Breakpoint on some line
  2. Set Enabled property of this breakpoint to false
Teardown: Delete breakpoint
RESULT:The line will be highlighted gray and gray square will be shown on the left side of the line.
5Disabled conditional breakpoint
  1. Set Enabled property of this breakpoint to false
Teardown: Delete the breakpoint
RESULT:The line will be highlighted gray and part of gray square will be shown on the left side of the line.
6Current program counter
  1. Invoke Step Into action
Teardown: Finnish debugging session
RESULT:Line 236 will be highlighted green and green arrow will be shown on the left side of the line.
7Program counter and breakpoint
  1. Toggle breakpoint on line 91
  2. Invoke Debug Main Project action
Teardown: Finnish debugging session and delete the breakpoint
RESULT:Debugger will stop on line 91. Line 91 will be highlighted green and red square with green arrow will be shown on the left side of the line.
8Program counter and multiple breakpoints
  1. Invoke Debug Main Project action
Teardown: Finnish debugging session and delete the breakpoints
RESULT:Debugger will stop on line 52. Line 52 will be highlighted green and two red squares with green arrow will be shown on the left side of the line.
9Call site
  1. Toggle breakpoint on line 101
  2. Invoke Debug Main Project action
Teardown: Finish debugging session and delete the breakpoint
RESULT:Debugger will stop on line 101. Line 58 and 236 will be highlighted lilac and lilac triangle will be shown on the left side of the line.

Test suite 13: Sessions view

Purpose: Verifies Sessions view functionality
Setup: Start NetBeans IDE with clear userdir. Open Sessions view.

#Test caseDescription
1Running local session
  1. Open project MemoryView and set it as main project
  2. Invoke Debug Main Project action
Teardown: Kill debugging session
RESULT:Application will be started. There will be node with name examples.advanced.MemoryView representing this session in the Sessions view. State of the session will be Running and Language will be Java.
2Remote session - listening
  1. Invoke "Attach Debugger..." action
  2. Select SocketListenfrom Connector combo box
  3. Type localhost in Local address edit box
  4. Type 1234 in Port edit box and press OK
  5. Execute MemoryView from console (use switches -Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:1234)
Teardown: Finish debugging session
RESULT:There will be node with name listenning:1234 representing this session in the Sessions view. State of session will be Running and Language will be Java.
3Remote session - attaching
  1. Execute MemoryView from console (use switches -Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:1234,server=y)
  2. Invoke "Attach Debugger..." action
  3. Select SocketAttachfrom Connector combo box
  4. Type localhost in Host edit box
  5. Type 1234 in Port edit box and press OK
Teardown: Finish debugging session and application
RESULT:There will be node with name localhost:1234 representing this session in the Sessions view. State of session will be Running and Language will be Java.
4Switch to session
  1. Close source files MemroyView.java and LineBreakpoints.java in editor
  2. Select session examples.advanced.MemoryView and invoke Make Current action from its context menu
Teardown: Finish debugging sessions, delete breakpoints and delete watches
RESULT:File MemoryView.java will be opened in editor and current program counter annotation will be displayed on line 91. Watches view will display value of expression free and will not display value of expression n (message "n" is not a known variable in current context will be displayed instead).
5Session state
  1. Open project MemoryView and set it as main project
  2. Invoke Debug Main Project action
  3. State of the session examples.advanced.MemoryView will be Running
  4. Toggle breakpoint on line 101 in MemoryView.java
Teardown: Finish debugging session and delete the breakpoint
RESULT:Debugger will stop on the breakpoint and session state will be changed to Stopped
6Finish session
  1. Close source files MemroyView.java and LineBreakpoints.java in editor
  2. Select session tests.LineBreakpoints and invoke Finish action from its context menu
Teardown: Finish debugging session, delete breakpoints and delete watches
RESULT:File MemoryView.java will be opened in editor and current program counter annotation will be displayed on line 91. Watches view will display value of expression free and will not display value of expression n (message "n" is not a known variable in current context will be displayed instead).
7Stopped local session
  1. Open project MemoryView and set it as main project
  2. Toggle breakpoint on line 96
  3. Invoke Debug Main Project action
Teardown: Kill debugging session
RESULT:Debugger will stop on breakpoint. There will be node with name examples.advanced.MemoryView representing this session in the Sessions view. State of the session will be Stopped and Language will be Java.
8Multiple sessions
  1. Open project MemoryView and set it as main project
  2. Toggle breakpoint on line 91 of file MemoryView.java
  3. Invoke Run | New Watch and create watch expression free
  4. Invoke Debug Main Project action
  5. Toggle breakpoint on line 200 of file LineBreakpoints.java
  6. Invoke Run | New Watch and create watch expression n
  7. Invoke Run | Run File | Debug "LineBreakpoints.java"
Teardown: Finish debugging sessions, delete breakpoints and delete watches
RESULT:Sessions view will display two sessions - examples.advanced.MemoryView, tests.LineBreakpoints - both in running state. The session tests.LineBreakpoints will be displayed in bold. Watches view will display value of expression n and will not display value of expression free (message "free" is not a known variable in current context will be displayed instead).
9Finish all sessions
  1. Select session tests.LineBreakpoints and invoke Finish All action from its context menu
Teardown: Delete breakpoints and delete watches
RESULT:Both debugging sessions will be closed.
10View columns
  1. Click small button right below view close button
  2. In SessionsView - Change Visible Columns dialog check Host Name checkbox
  3. Press OK
RESULT:Sessions view will display four columns: Name, State, Language, Host Name.

Test suite 14: Threads view

Purpose: Verifies Thread View functionality
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open Threads view.

#Test caseDescription
1Name
  1. Invoke Debug Main Project action
  2. Wait until GUI of the MemoryView is shown
  3. Open Threads view and expand nodes system and main
Teardown: Finish debugging session
RESULT:There will be thread with name TimerQueue.
2State
  1. Invoke Debug Main Project action
  2. Wait until GUI of the MemoryView is shown
  3. Open Threads view and expand nodes system and main
Teardown: Finish debugging session
RESULT:State of thread TimerQueue should be set to Waiting (this thread is spending a lot of its time by waiting).
3Switch to thread
  1. Toggle breakpoint on line 106 of file MemoryView.java
  2. Invoke Run | New Watch and create watch expression free
  3. Invoke Debug Main Project action
  4. Debugger should stop on the breakpoint after a while
  5. Select node TimerQueue in the Threads view
  6. Invoke Make Current action from contex menu of this node
Teardown: Finish debugging session and delete the breakpoint
RESULT:Call Stack view will show information about TimerQueue thread.
4Method name
  1. Toggle breakpoint on line 106
  2. Invoke Debug Main Project action
  3. Debugger should stop on the breakpoint after a while
  4. Select node AWT-EventQueue in the Threads view
  5. Invoke Window | Debugging | Call Stack action
Teardown: Finish debugging session and remove breakpoint
RESULT:Top call stack line will be MemoryView.UpdateStatus:106.
5Suspend thread