[RSS]

Debugger Test Specification for NetBeans 6.0

Author: Emanuel Hucka
Version: 1.4
Lastupdate: 2007/07/09
Introduction: This document describes test specification for testing of debuggerjpda module in NetBeans ide. Debuggerjpda is implementation of most common Java debugger - JPDA. The tests also cover debuggercore module providing basic framework for implementations of all debuggers in IDE.
Comments: There are used test projects MemoryView and freeform in test cases.

Test suite: Menu items

Purpose: This test suite verifies if all menu items are presented on correct places.
Setup: Start NetBeans IDE with clear userdir
  1. Window menu
    1. Expand menu Window from the main menu
    • EXPECTED RESULT: Menu Window contains folowing submenu items:
      • Debugging (with submenu)
        • Local Variables
        • Watches
        • Call Stack
        • Loaded Classes
        • Breakpoints
        • Sessions
        • Threads
        • Sources
  2. Run menu I
    1. Expand menu Run from the main menu
    • EXPECTED RESULT: Menu Run contains folowing menu items regarding to debugger:
      • Debug Main Project
      • Run File (with submenu) >
        • Debug File
        • Debug Test for File
      • Attach Debugger...
      • Finish Debugger Session
      • Pause
      • Continue
      • Step Over
      • Step Over Expression
      • Step Into
      • Step Out
      • Run to Cursor
      • Run Into Method
      • Apply Code Changes
      • Stack (with submenu) >
        • Make Callee Current
        • Make Caller Current
        • Pop Topmost Call
      • Toggle Line Breakpoint
      • New Breakpoint
      • New Watch
      • Evaluate Expression
  3. Run menu II
    1. Open MemoryView project
    2. Expand menu Run from the main menu
    • EXPECTED RESULT: Menu Run contains folowing enabled menu items:
      • Debug Main Project
      • Attach Debugger...
      • Step Into
      • New Breakpoint
      • New Watch
  4. Run menu III
    1. Open MemoryView.java file
    2. Expand menu Run from the main menu
    • EXPECTED RESULT: Menu Run contains folowing enabled menu items:
      • Debug Main Project
      • Run File | Debug "MemoryView.java"
      • Attach Debugger...
      • Step Into
      • Run to Cursor
      • Toggle Line Breakpoint
      • New Breakpoint
      • New Watch
  5. View menu
    1. Expand View | Toolbars menu from the main menu
    • EXPECTED RESULT: The following menu item must be presented in Toolbars menu:
      • Debug

Test suite: Toolbars

Purpose: Test suite verifies content of debugger toolbar
Setup: Start NetBeans IDE with clear userdir.
  1. Build toolbar
    1. Open View | Toolbars and check Build menu item
    • EXPECTED RESULT: Make sure the toolbar contains Debug Main Project button (enabled/disabled regarding of opened projects)
    • Teardown: Invoke View | Toolbars and unselect Debug menu item.
  2. Debugger toolbar
    1. Invoke View | Toolbars and check Debug menu item
    • EXPECTED 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 Over Expression
      • Step Into
      • Step Out
      • Run to Cursor
      • Apply Code Changes
  3. Enabling actions I
    1. Open MemoryView project
    • EXPECTED RESULT: Make sure that following toolbar buttons are enabled in Build toolbar: Debug Main Project. Make sure that following toolbar buttons are enabled in Debugger toolbar: Step Into
  4. Enabling actions II
    1. Open source file MemoryView.java in editor
    • EXPECTED RESULT: Make sure that following toolbar buttons are enabled in Debug toolbar:
      • Step Into
      • Run to Cursor

Test suite: Editor

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

  1. Editor popup menu
    • Setup: Open project MemoryView
    1. Open file MemoryView.java in editor
    2. Invoke popup menu in editor area
    • EXPECTED RESULT: Make sure that following menu items are presented:
      • Debug File
      • Run Into Method
      • New Watch...
      • Toggle Line Breakpoint

Test suite: Debugger views

Purpose: Tests of debugger views existence and persistence
Setup: Start NetBeans IDE with clear userdir
  1. Local variables
    1. Invoke Window | Debugging | Local Variables
    • EXPECTED RESULT: Local Variables view (tab) is opened in area below the editor
  2. Watches
    1. Invoke Window | Debugging | Watches
    • EXPECTED RESULT: Watches view (tab) is opened in area below the editor
  3. Call Stack
    1. Invoke Window | Debugging | Call Stack
    • EXPECTED RESULT: Call Stack view (tab) is opened in area below the editor
  4. Loaded Classes
    1. Invoke Window | Debugging | Loaded Classes
    • EXPECTED RESULT: Loaded Classes view (tab) is opened in area below the editor
  5. Breakpoints
    1. Invoke Window | Debugging | Breakpoints
    • EXPECTED RESULT: Breakpoints view (tab) is opened in area below the editor
  6. Sessions
    1. Invoke Window | Debugging | Sessions
    • EXPECTED RESULT: Sessions view (tab) is opened in area below the editor
  7. Threads
    1. Invoke Window | Debugging | Threads
    • EXPECTED RESULT: Threads view (tab) is opened in area below the editor
  8. Sources
    1. Invoke Window | Debugging | Sources
    • EXPECTED RESULT: Sources view (tab) is opened in area below the editor
  9. View 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. Finish debugging session
    4. Start new debugging session.
    • EXPECTED RESULT: Ensure all the views are opened and are arranged the same, as in first session.
    • Teardown: Finish the debugger session
  10. View 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
    • EXPECTED RESULT: Ensure all the views are opened and are arranged the same, as before restart.
    • Teardown: Close debugger views

Test suite: 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.
  1. Start debugger
    1. Invoke Debug Main Project action from menu or toolbar
    • EXPECTED RESULT: Debugger Console is opened in output. There is written 'Listening on some_port_number' followed by 'User program running' and application is started.
    • Teardown: Close debugged application
  2. Start debugger II
    1. Invoke popup menu above project node in project tree and click menu item Debug Debug
    • EXPECTED RESULT: Debugger Console is opened in output. There is written 'Listening on some_port_number' followed by 'User program running' and application is started.
    • Teardown: Close debugged application
  3. Stop debugged application
    1. Invoke Debug Main Project action from menu or toolbar, wait until debugger and application are started
    2. Finish debugged application by pressing its Close button
    • EXPECTED RESULT: 'User program finished' message will be shown in the status bar and in Debugger Console.
  4. Kill 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
    • EXPECTED RESULT: 'User program finished' message will be shown in the status bar and in Debugger Console. The debugged applcation will be closed.
  5. Pause 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
    • EXPECTED RESULT: 'User program stopped' message will be shown in the status bar and in Debugger Console. The debugged application will stop responding.
  6. Continue debugging session
    • Setup: Process steps from Pause debugging session testcase
    1. Invoke Continue action from menu or toolbar
    • EXPECTED RESULT: 'User program running' message will be shown in the status bar and in Debugger Console and the debugged application will run
    • Teardown: Finish debugging session
  7. Breakpoint functionality
    1. Open file MemoryView.java in editor
    2. Place your caret on line 101
    3. Invoke Toggle Line Breakpoint action from editor's popup menu
    4. Invoke Debug Main Project action from menu or toolbar
    • EXPECTED RESULT: Debugger will be started and after a while it will stop on line 101
    • Teardown: Remove the breakpoint
  8. Run to cursor
    • Setup: Proceed steps from Breakpoint functionality tescase
    1. Place your caret on line 96
    2. Invoke Run to Cursor action from menu or toolbar
    • EXPECTED RESULT: Debugger will run for a while and stop on line 96.
    • Teardown: Finish debugging session
  9. Run to cursor - start debugging
    1. Open file MemoryView.java in editor
    2. Place your caret on line 101
    3. Invoke Run to Cursor action from menu or toolbar
    • EXPECTED RESULT: Debugger will start and run for a while and stop on line 101.
    • Teardown: Finish debugging session
  10. Step Into - start debugging
    1. Invoke Step Into action from menu or toolbar
    • EXPECTED RESULT: Debugger will be started and stop on the first line of main method.
    • Teardown: Finish debugging session
  11. Step Into
    1. Open file MemoryView.java in editor
    2. Place your caret on line 58
    3. Invoke Toggle Line 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
    • EXPECTED RESULT: Debugger will stop on line 86.
    • Teardown: Finish debugging session
  12. Step Over
    1. Invoke Debug Main Project action from menu or toolbar
    2. Wait till debugger stops on line 58
    3. Invoke Step Over action
    • EXPECTED RESULT: Debugger will stop on line 60.
    • Teardown: Finish debugging session and delete all breakpoints
  13. Step Over Expression
    1. Toggle line breakpoint on line 101
    2. Invoke Debug Main Project action from menu or toolbar
    3. Wait till debugger stops on line 101
    4. Invoke Step Over Expression action five times
    • EXPECTED RESULT: Debugger will step on all methods of the expression
    • Teardown: Finish debugging session and delete all breakpoints
  14. Step Out
    1. Toggle line breakpoint on line 58
    2. Invoke Debug Main Project action from menu or toolbar
    3. Wait till debugger stops on line 58
    4. Invoke Step Into action
    5. Wait till debugger stops on line 86
    6. Invoke Step Out action
    • EXPECTED RESULT: Debugger will stop on line 60.
    • Teardown: Finish debugging session and remove breakpoint
  15. Run Into Method
    1. Toggle line breakpoint on line 53
    2. Invoke Debug Main Project action from menu or toolbar
    3. Wait till debugger stops on line 53
    4. Place your caret on line 58 between 9th and 21st character (text updateStatus)
    5. Invoke Run Into Method action from main menu
    • EXPECTED RESULT: Debugger will stop on line 86.
    • Teardown: Finish debugging session and remove breakpoint
  16. Run Into Method - JDK method
    1. Place your caret on line 193
    2. Invoke Toggle Line Breakpoint breakpoint from editor's popup menu
    3. Invoke Debug Main Project action from menu or toolbar
    4. In MemoryView application press Apply button and wait till debugger stops on line 193
    5. Invoke Window|Debugging|Sources
    6. In Sources view check the java sources to be used for debugging (<JAVA_HOME>/src.zip)
    7. Place your caret on line 193 between 56th and 64st character (text intValue)
    8. Invoke Run Into Method action from main menu
    • EXPECTED RESULT: Debugger will stop on line 644 of file Integer.java.
    • Teardown: Finish debugging session and uncheck java sources for debugging
  17. Run Into Method without source
    1. Toggle line breakpoint on line 193
    2. Invoke Debug Main Project action from menu or toolbar
    3. In MemoryView application press Apply button and wait till debugger stops on line 193
    4. Place your caret on line 193 between 56th and 64st character (text intValue)
    5. Assure in sources view the java sources are not used for debugging
    6. Invoke Run Into Method action from main menu
    • EXPECTED RESULT: Debugger will stop on line 194 of file MemoryView.java.
    • Teardown: Finish debugging session and remove breakpoint
  18. Kill 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
    • EXPECTED RESULT: 'User program finished' message will be shown in the status bar and in Debugger Console. The debugged applcation will be closed.

Test suite: 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.
  1. Line number customize I
    1. Open file MemoryView.java in editor
    2. Toggle line breakpoint on line 88
    3. Invoke Debug Main Project action from menu or toolbar
    4. Wait till debugger stops on the line 88
    5. Select corresponding breakpoint in the Breakpoints view
    6. Invoke Customize from context menu and change Line Number property of this breakpoint to 101
    7. Confirm the dialog and invoke Continue action
    • EXPECTED RESULT: There must be breakpoint annotation on the line 101. Debugger must stop on line 101 of MemoryView.java
    • Teardown: Finish debugging session and remove breakpoint
  2. Line number customize II
    1. Open file MemoryView.java in editor
    2. Toggle line 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. Confirm the dialog
    • EXPECTED RESULT: Ensure that no exception is thrown (MemoryView has less then 500 lines) and an information dialog appears with a message The line number 500 is too big.
    • Teardown: Finish debugging session and remove breakpoint
  3. Line number customize III
    1. Open file MemoryView.java in editor
    2. Toggle line breakpoint on line 96
    3. Invoke Customize from context menu above breakpoint icon in gutter in editor area and change Line Number property of this breakpoint to 500
    4. Confirm the dialog
    • EXPECTED RESULT: Ensure that no exception is thrown (MemoryView has less then 500 lines) and an information dialog appears with a message The line number 500 is too big.
    • Teardown: Finish debugging session and remove breakpoint
  4. Print text
    1. Open file MemoryView.java in editor
    2. Toggle line 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
    • EXPECTED RESULT: Debugger should stop on the breakpoint after a while and message "Breakpoint hit!" should be shown in Debugger Console
    • Teardown: Finish debugging session and remove breakpoint
  5. Breakpoint in method
    1. Open file LineBreakpoints.java in editor
    2. Toggle line breakpoint on line 154
    3. Invoke Debug File action from context menu of the file in Projects explorer
    • EXPECTED RESULT: Debugger will stop on the breakpoint on line 154.
    • Teardown: Finish debugging session and delete the breakpoint
  6. Breakpoint in static method
    1. Open file LineBreakpoints.java in editor
    2. Toggle line breakpoint on line 150
    3. Invoke Debug File action from context menu of the file in Projects explorer
    • EXPECTED RESULT: Debugger should stop on the breakpoint on line 150
    • Teardown: Finish debugging session and delete the breakpoint
  7. Breakpoint in initializer
    1. Open file LineBreakpoints.java in editor
    2. Toggle line breakpoint on line 10
    3. Invoke Debug File action from context menu of the file in Projects explorer
    • EXPECTED RESULT: Debugger should stop on the breakpoint on line 10
    • Teardown: Finish debugging session and delete the breakpoint
  8. Breakpoint 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
    • EXPECTED RESULT: Debugger should stop on the breakpoint on line 6
    • Teardown: Finish debugging session and delete the breakpoint
  9. Breakpoint 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
    • EXPECTED RESULT: Debugger should stop on the breakpoint on line 158
    • Teardown: Finish debugging session and delete the breakpoint
  10. Breakpoint 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
    • EXPECTED RESULT: Debugger should stop on the breakpoint on line 15
    • Teardown: Finish debugging session and delete the breakpoint
  11. Breakpoint 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
    • EXPECTED RESULT: Debugger should stop on the breakpoint on line 37
    • Teardown: Finish debugging session and delete the breakpoint
  12. Breakpoint 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
    • EXPECTED RESULT: Debugger should stop on the breakpoint on line 93
    • Teardown: Finish debugging session and delete the breakpoint
  13. Other 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
    • EXPECTED RESULT: Debugger should stop on the breakpoint on line 52
    • Teardown: Finish debugging session and delete the breakpoint
  14. Other 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
    • EXPECTED RESULT: Debugger should stop on the breakpoint on line 74
    • Teardown: Finish debugging session and delete the breakpoint
  15. Other 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
    • EXPECTED RESULT: Debugger should stop on the breakpoint on line 23
    • Teardown: Finish debugging session and delete the breakpoint
  16. Other 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
    • EXPECTED RESULT: Debugger should stop on the breakpoint on line 104
    • Teardown: Finish debugging session and delete the breakpoint
  17. Other 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
    • EXPECTED RESULT: Debugger should stop on the breakpoint on line 122
    • Teardown: Finish debugging session and delete the breakpoint
  18. Other breakpoints VI
    1. Open file LineBreakpoints.java in editor
    2. Toggle line breakpoint on line 140
    3. Invoke Debug File action from context menu of the file in Projects explorer
    • EXPECTED RESULT: Debugger should stop on the breakpoint on line 140
    • Teardown: Finish debugging session and delete the breakpoint
  19. Breakpoint placement - fast test
    1. Open file LineBreakpoints.java in editor
    2. Toggle line breakpoints on lines 6, 10, 15, 23, 37, 52, 74, 93, 104, 122, 140, 150, 154, 158, 200.
    3. Invoke Debug File action from context menu of the file in Projects explorer
    • EXPECTED RESULT: Disable each hit breakpoint and press continue. After the application is finished all breakpoints in Breakpoints view must be disabled.
  20. Suspend debugging - all threads
    1. Open file ThreadSuspending.java in editor
    2. Toggle line breakpoint on line 39
    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
    • EXPECTED RESULT: Debugger will start and will hit the breakpoint. In output window some output from Thread-1 (less than 100) and no output from Thread-2 will be displayed.
    • Teardown: Finish debugging session
  21. Suspend debugging - current thread
    1. Select the breakpoint in the Breakpoints view
    2. Invoke Customize from context menu and change Suspend property of this breakpoint to Breakpoint thread
    3. Invoke Debug File action from context menu of the file in Projects explorer
    • EXPECTED 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.
    • Teardown: Finish debugging session
  22. Suspend debugging - no threads
    1. Select the breakpoint in the Breakpoints view
    2. Invoke Customize from context menu and change Suspend property of this breakpoint to No thread (continue)
    3. Invoke Debug File action from context menu of the file in Projects explorer
    • EXPECTED 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.
    • Teardown: Delete the breakpoint
  23. Go To Source
    1. Open file MemoryView.java in editor
    2. Toggle line 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
    • EXPECTED RESULT: Source Editor should be opened with file MemoryView.java with caret on line 96
    • Teardown: Remove breakpoint
  24. Toggle Line Breakpoint - main menu
    1. Open file MemoryView.java in editor
    2. Place carret on line 45
    3. Invoke Run | Toggle Line Breakpoint action
    • EXPECTED RESULT: Breakpoint will be created on line 45. The line will be highlighted in red and the breakpoint will be shown in Breakpoints view.
    • Teardown: Remove the breakpoint
  25. Toggle Line Breakpoint - context menu
    1. Open file MemoryView.java in editor
    2. Place carret on line 45
    3. Invoke Toggle Line Breakpoint action from context menu of editor
    • EXPECTED RESULT: Breakpoint will be created on line 45. The line will be highlighted in red and the breakpoint will be shown in Breakpoints view.
    • Teardown: Remove the breakpoint
  26. Toggle Line Breakpoint - gutter
    1. Open file MemoryView.java in editor
    2. Click with mouse (left button) on editor gutter on line 45
    • EXPECTED RESULT: Breakpoint will be created on line 45. The line will be highlighted in red and the breakpoint will be shown in Breakpoints view.
    • Teardown: Remove the breakpoint
  27. Toggle Line Breakpoint - keyboard shortcut
    1. Open file MemoryView.java in editor
    2. Place carret on line 45
    3. Press Ctrl + F8
    • EXPECTED RESULT: Breakpoint will be created on line 45. The line will be highlighted in red and the breakpoint will be shown in Breakpoints view.
    • Teardown: Remove the breakpoint
  28. Conditioned breakpoint I
    1. Toggle line breakpoint on line 98 and 101 of Memory.java
    2. Select node Line MemoryView.java:98 in Breakpoints view and invoke Customize action from its context menu
    3. Check its Condition checkbox and set condition value to false
    4. Select node Line MemoryView.java:101 and invoke Customize action from its context menu
    5. Check Condition checkbox and set condition value to true
    6. Invoke Debug Main Project action
    • EXPECTED RESULT: Debugger will not stop on breakpoint on line 98. Debugger will stop on the breakpoint on line 101.
  29. Conditioned breakpoint II
    1. Select node Line MemoryView.java:98 in Breakpoints view and invoke Customize action from its context menu
    2. Check Condition checkbox and set condition value to 1 == 0
    3. Select node Line MemoryView.java:101 and invoke Customize action from its context menu
    4. Check Condition checkbox and set condition value to 1 != 0
    5. Invoke Continue action
    • EXPECTED RESULT: Debugger will not stop on breakpoint on line 98. Debugger will stop on the breakpoint on line 101.
  30. Conditioned breakpoint III
    1. Select node Line MemoryView.java:98 in Breakpoints view and invoke Customize action from its context menu
    2. Check Condition checkbox and set condition value to (1 == 0) || false
    3. Select node Line MemoryView.java:101 and invoke Customize action from its context menu
    4. Check Condition checkbox and set condition value to (1 != 0) && true
    5. Invoke Continue action
    • EXPECTED RESULT: Debugger will not stop on breakpoint on line 98. Debugger will stop on the breakpoint on line 101.
  31. Conditioned breakpoint IV
    1. Select node Line MemoryView.java:98 in Breakpoints view and invoke Customize action from its context menu
    2. Check Condition checkbox and set condition value to Boolean.FALSE.booleanValue()
    3. Select node Line MemoryView.java:101 and invoke Customize action from its context menu
    4. Check Condition checkbox and set condition value to Boolean.TRUE.booleanValue()
    5. Invoke Continue action
    • EXPECTED RESULT: Debugger will not stop on breakpoint on line 98. Debugger will stop on the breakpoint on line 101.
  32. Conditioned breakpoint V
    1. Select node Line MemoryView.java:98 in Breakpoints view and invoke Customize action from its context menu
    2. Check Condition checkbox and set condition value to x!~10a#
    3. Invoke Continue action
    • EXPECTED RESULT: Debugger will stop on breakpoint on line 98. Debugger console will contain message:
      com.sun.tools.jdi.IntegerValueImpl cannot be cast to com.sun.jdi.BooleanValue
    • Teardown: Finish debugging session and delete breakpoint
  33. Conditioned breakpoint VI
    1. Open file LineBreakpoints.java in editor
    2. Toggle line breakpoint on line 190
    3. Select node Line LineBreakpoints.java:190 and invoke Customize action from its context menu
    4. Check Condition checkbox and set condition value to i > 10
    5. Invoke Debug File action from context menu of the file in Projects explorer
    6. Invoke Window | Debugging | Local Variables action from context menu
    • EXPECTED RESULT: Debugger will stop on the breakpoint after a while. Variable i in Local Variables view will have value 11.
    • Teardown: Finish debugging session and delete breakpoint
  34. Breakpoints Validation I
    1. Open file MemoryView.java in editor
    2. Toggle line breakpoint on lines 24, 31, 37, 43, 46, 57, 64, 90, 248.
    3. Invoke Debug Main Project action
    • EXPECTED RESULT: Debugger console will contain messages for all breakpoints:
      • Not able to submit breakpoint LineBreakpoint MemoryView.java :
      • reason: No executable location available at line .
      • Invalid LineBreakpoint MemoryView.java.
      • Debugger will not stop on any of the breakpoints. Icons of the breakpoints are changed to invalid version.
  35. Breakpoints Validation II
    1. Select examples.advanced package of main project
    2. Invoke New | File action from its popup menu
    3. Select Java Classes | Java Main Class, invoke next and finish the wizard.
    4. In the new opened class go to main method and write System.out.println("1"); on line 26, press enter six times and write System.out.println("2"); on line 32
    5. Close the file in ide and edit it outside ide - remove the 5 empty lines between two System.out.println methods.
    6. Back in ide invoke Debug File on the NewMain file in Projects view
    • EXPECTED RESULT: Debugger console will contain messages:
      • LineBreakpoint NewMain.java : 26 successfully submited.
      • Not able to submit breakpoint LineBreakpoint MemoryView.java : 32,
      • reason: No executable location available at line 32.
      • Invalid LineBreakpoint NewMain.java : 32
    • Teardown: Finish debugging session and delete breakpoint
  36. Breakpoint Hit Count - equals
    1. Open file LongArrays.java in editor
    2. Toggle line breakpoint on line 35
    3. Go to Breakpoints view and customize the breakpoint
    4. Check Break when hit count checkbox, select equals to in appropriate combobox and put 10 into the textfield.
    5. Confirm customize dialog and invoke Debug File action.
    6. After debugger hit the breakpoint open Local Variables view and find variable 'j'.
    • EXPECTED RESULT: Value of the variable 'j' is 9.
    • Teardown: Finish debugging session and delete breakpoint
  37. Breakpoint Hit Count - is greater than
    1. Open file LongArrays.java in editor
    2. Toggle line breakpoint on line 35
    3. Go to Breakpoints view and customize the breakpoint
    4. Check Break when hit count checkbox, select is greater than in appropriate combobox and put 998 into the textfield.
    5. Confirm customize dialog and invoke Debug File action.
    6. After debugger hit the breakpoint open Local Variables view and find variable 'j'.
    • EXPECTED RESULT: Value of the variable 'j' is 997.
    • Teardown: Finish debugging session and delete breakpoint
  38. Breakpoint Hit Count - is multiple of
    1. Open file LongArrays.java in editor
    2. Toggle line breakpoint on line 35
    3. Go to Breakpoints view and customize the breakpoint
    4. Check Break when hit count checkbox, select is multiple of in appropriate combobox and put 100 into the textfield.
    5. Confirm customize dialog and invoke Debug File action.
    6. After debugger hit the breakpoint open Local Variables view and find variable 'j'.
    7. Invoke Continue a few times
    • EXPECTED RESULT: Value of the variable 'j' is 99 than 199, 299 etc.
    • Teardown: Finish debugging session and delete breakpoint

Test suite: 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.
  1. Method 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
    • EXPECTED 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.java.
    • Teardown: Finish debugging session and delete the breakpoint
  2. Method breakpoint on constructor
    1. Put caret on line 46
    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
    • EXPECTED RESULT: The method breakpoint Method MemoryView.MemoryView will be created and shown in Breakpoints view. The debugger will start and will stop after a while on line 44 in MemoryView.java.
    • Teardown: Finish debugging session and delete the breakpoint
  3. Method breakpoint on inner method
    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
    • EXPECTED RESULT: The method breakpoint will be created and shown in Breakpoints view. The debugger will start and will stop after a while on line 62 in MemoryView.
    • Teardown: Finish debugging session and delete the breakpoint
  4. Method 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
    • EXPECTED RESULT: The debugger will start and will stop after a while on line 236 in MemoryView.
    • Teardown: Finish debugging session and delete the breakpoint
  5. Method breakpoint on all methods
    1. Put caret on line 31
    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
    • EXPECTED RESULT: In the new Breakpoint dialog All Methods for Given Classes should be checked. Debugger will stop at MemoryView.java at line 236. After invoking Continue action it should stop on lines 44, 116, 86, 73, 26, 86, 26, 86...
    • Teardown: Finish debugging session and delete all breakpoints
  6. Method Breakpoints from gutter
    1. Click on gutter of lines 44, 85 and 235 of MemoryView.java
    2. Check appropriate method breakpoints are created in Breakpoints view. (MemoryView.MemoryView, MemoryView.updateStatus, MemoryView.main) New breakpoints should have set property Stop On : Method Access.
    3. Click on gutter of lines 44, 85 and 235 of MemoryView.java again
    • EXPECTED RESULT: All created breakpoints should be deleted
  7. Conditional 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. Check Condition checkbox, set value of condition to false and press OK
    5. Invoke Debug Main Project action
    • EXPECTED RESULT: Debugger will not stop at the breakpoint
    • Teardown: Finish debugging session and delete the breakpoint
  8. Stop On Method Entry and Exit
    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. Select Stop On: Method Entry or Exit checkbox and press OK
    5. Invoke Debug Main Project action
    6. Wait the debugger hits the breakpoint and invoke Continue action
    • EXPECTED RESULT: Debugger will stop in MemoryView.java at line 86 and after continue at line 108.
  9. Method breakpoint customize
    1. Open file MemoryView.java in editor
    2. Put caret on line 120
    3. Invoke action Run | New Breakpoint from menu
    4. In New Breakpoint dialog set Breakpoint Type to Method and press OK
    5. Invoke Debug Main Project action from menu or toolbar
    6. Wait till debugger stops on the line 116
    7. Select corresponding breakpoint in the Breakpoints view
    8. Invoke Customize from context menu and change Method Name property of this breakpoint to updateStatus, select Stop On Method Exit
    9. Confirm the dialog and invoke Continue action
    • EXPECTED RESULT: Debugger will stop on line 108
    • Teardown: Finish debugger session and delete all breakpoints
  10. Conditioned method breakpoint
    1. Click gutter on line 85 of MemoryView.java
    2. Customize created breakpoint, check Condition checkbox and set value of condition to 'false'
    3. Invoke Debug Main Project action
    • EXPECTED RESULT: Debugger is started but the breakpoint is not hit
    • Teardown: Finish debugger session and delete all breakpoints
  11. Method breakpoint - hit count
    1. Click gutter on line 85 of MemoryView.java
    2. Customize created breakpoint, check Break when hit count checkbox, select equals to type and set value of condition to 2.
    3. Invoke Debug Main Project action and wait the debugger is stopped
    4. Invoke Step out action
    • EXPECTED RESULT: Debugger is stopped on line 86.
    • Teardown: Finish debugger session and delete all breakpoints
  12. Print 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
    • EXPECTED RESULT: Debugger will stop on the breakpoint and "Breakpoint Hit!" will be printed to the Debugger Console.
    • Teardown: Finish debugging session and delete the breakpoint

Test suite: Field breakpoints

Purpose: Verifies field breakpoints 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.
  1. Create field breakpoint from class
    1. Put caret on line 31 of MemoryView.java
    2. Invoke action Run | New Breakpoint from menu
    3. In New Breakpoint dialog set Breakpoint Type to Field, set Field name to 'timer' and confirm the dialog
    • EXPECTED RESULT: A new breakpoint is created. Check Breakpoints view for 'Field MemoryView.timer access' line
  2. Create field breakpoint on field
    1. Put caret on line 30, on column 34 to 43
    2. Invoke action Run | New Breakpoint from menu and confirm the dialog
    • EXPECTED RESULT: A new breakpoint is created. Check Breakpoints view for Field MemoryView.msgMemory access line
  3. Create field breakpoint selected text
    1. Select field bundle on line 39 (doubleclick on the field name or select field name in editor)
    2. Invoke action Run | New Breakpoint from menu and confirm the dialog
    • EXPECTED RESULT: A new breakpoint is created. Check Breakpoints view for Field MemoryView.bundle access line
    • Teardown: Remove all breakpoints.
  4. Field breakpoint from gutter
    1. Click on editor gutter for line 30 of MemoryView.java
    2. Check a new field breakpoint of MemoryView.msgMemory is created in Breakpoints View.
    3. Click on editor gutter for line 30 of MemoryView.java again
    • EXPECTED RESULT: The created breakpoint should be deleted.
  5. Stop on field access
    1. Select field timer on line 35 (doubleclick on the field name or select field name in editor)
    2. Invoke action Run | New Breakpoint from menu
    3. Ensure the Stop on is set to Field Access and press OK
    4. Invoke Debug Main Project action
    • EXPECTED RESULT: The field breakpoint Field 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.
    • Teardown: Finish debugging session and delete the breakpoint
  6. Stop on field modification
    1. Select field timer on line 35 (doubleclick on the field name or select field name in editor)
    2. Invoke action Run | New Breakpoint from menu
    3. Select the Stop on to Field Modification and press OK
    4. Invoke Debug Main Project action
    • EXPECTED RESULT: The field breakpoint Field 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.
    • Teardown: Finish debugging session and delete the breakpoint
  7. Stop on field access and modification
    1. Select field timer on line 35 (doubleclick on the field name or select field name in editor)
    2. Invoke action Run | New Breakpoint from menu
    3. Select the Stop on to Field Access and Modification and press OK
    4. Invoke Debug Main Project action
    • EXPECTED RESULT: The field breakpoint Field MemoryView.timer access or modification will be created and shown in Breakpoints view. The debugger will start and will stop after a while on line 38 in MemoryView.
    • Teardown: Finish debugging session and delete the breakpoint
  8. Conditional field breakpoint
    1. Select field timer on line 35 (doubleclick on the field name or select field name in editor)
    2. Invoke action Run | New Breakpoint from menu
    3. Ensure the Stop on is set to Field Access
    4. Check Condition checkbox, set condition property to false and press OK
    • EXPECTED RESULT: Debugger will not stop on the breakpoint.
    • Teardown: Finish debugging session and delete the breakpoint
  9. Field breakpoint customize
    1. Open file MemoryView.java in editor
    2. Put caret on line 39 and select field bundle
    3. Invoke action Run | New Breakpoint from menu and confirm the opened dialog
    4. Invoke Debug Main Project action from menu or toolbar
    5. Wait till debugger stops on the line 40
    6. Select corresponding breakpoint in the Breakpoints view
    7. Invoke Customize from context menu and change Field Name property of this breakpoint to timer and select Stop On Field Modification
    8. Confirm the dialog and invoke Continue action
    • EXPECTED RESULT: Debugger will stop on line 60
    • Teardown: Finish debugger session and delete all breakpoints
  10. Field breakpoint hit count
    1. Go to line 194 of MemoryView.java
    2. Select timer field (double click on it) and invoke action Run | New Breakpoint from menu
    3. Check Break when hit count checkbox, select is greater than type and set value of condition to 3.
    4. Confirm the dialog and start debugging (invoke Debug Main Project action from menu)
    5. After the application is started press Apply button in its window.
    • EXPECTED RESULT: Debugger will hit the breakpoint and stop on line 194
  11. Print text
    1. Select field timer on line 35 (doubleclick on the field name or select field 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
    • EXPECTED RESULT: Debugger should stop on line 65 and "Breakpoint Hit!" should be written to the Debugger Console
    • Teardown: Finish debugging session and delete the breakpoint

Test suite: 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.
  1. Pre-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 and confirm the dialog
    • EXPECTED RESULT: Check settings in New Breakpoint dialog: Class Name will be set to examples.advaced.MemoryView
    • Teardown: Cancel dialog
  2. Classes pattern
    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 examples.advanced.* as a Class Name
    5. Set Suspend Debugging combobox to No Thread (continue) and press OK
    6. Invoke Debug Main Project action
    • EXPECTED RESULT: MemoryView application will be started. 7 messages of hit class breakpoint will be shown in the Debugger Console (MemoryView, MemoryView$1, ...).
    • Teardown: Finish debugging session and delete the breakpoint
  3. Exclude classes
    1. Invoke action Run | New Breakpoint from menu
    2. Select Class from Breakpoint type combobox
    3. Enter examples.advanced.* as a Class Name
    4. Set Suspend Debugging combobox to No Thread (continue)
    5. Check Exclude classes checkbox and put examples.advanced.MemoryView$* to its textfield
    6. Press OK
    7. Invoke Debug Main Project action
    • EXPECTED RESULT: Breakpoint will be hit only one time - for examples.advanced.MemoryView
    • Teardown: Finish debugging session and delete the breakpoint
  4. Classes breakpoint hit count
    1. Put caret into body of the class MemoryView
    2. Invoke action Run | New Breakpoint from menu
    3. Select Class from Breakpoint type combobox, edit class name to examples.advanced.*, check Break when hit count checkbox, select equals to and put '2' to the condition's textfield. Press OK
    4. Invoke Debug Main Project action
    • EXPECTED RESULT: Debugger will stop on breakpoint - Class breakpoint hit for class examples.advanced.MemoryView$2.
    • Teardown: Finish debugging session and delete the breakpoint
  5. Class breakpoint customize
    1. Open file MemoryView.java in editor
    2. Put caret on line 39
    3. Invoke action Run | New Breakpoint from menu, select Class Breakpoint Type and confirm the dialog
    4. Invoke Debug Main Project action from menu or toolbar
    5. Wait till debugger stops on the class breakpoint
    6. Select the breakpoint in the Breakpoints view
    7. Invoke Customize from context menu and change Class Name property of this breakpoint to examples.advanced.MemoryView$1
    8. Confirm the dialog and invoke Continue action
    • EXPECTED RESULT: Debugger will stop on line 60
    • Teardown: Finish debugger session and delete all breakpoints
  6. Print 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 examples.advanced.MemoryView* as a Class Name
    5. Change Print Text to Breakpoint Hit!
    6. Press OK
    7. Invoke Debug Main Project action
    • EXPECTED RESULT: Debugger will stop on the breakpoint and "Breakpoint Hit!" will be written to the Debugger Console.
    • Teardown: Finish debugging session and delete the breakpoint

Test suite: 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.
  1. Exception breakpoint
    1. Invoke action Run | New Breakpoint from menu
    2. Select Exception from Breakpoint type combobox
    3. Enter java.lang.ClassNotFoundException as a Exception Class Name
    4. Select Caught or Uncaught from the Stop On combobox
    5. Press OK
    6. Invoke Debug Main Project action
    • EXPECTED RESULT: Breakpoint will be hit by caught ClassNotFoundException.
    • Teardown: Finish debugging session and delete the breakpoint
  2. Exception breakpoint filter throwing classes
    1. Invoke action Run | New Breakpoint from menu
    2. Select Exception from Breakpoint type combobox
    3. Enter java.lang.ClassNotFoundException as a Exception Class Name
    4. Check Filter on Classes Throwing the Exception and write java.lang.ClassLoader to Match Classes.
    5. Select Suspend action No thread (Continue) and confirm the dialog.
    6. Invoke Debug Main Project action
    7. Finish debugger session and customize the breakpoint
    8. Write java.net.URLClassLoader* to Exclude Classes. Clear Match Classes.
    9. Invoke Debug Main Project action
    • EXPECTED RESULT: Debugger will hit the breakpoint only in java.lang.ClassLoader class for the first filter. For the second filter it never hit the breakpoint from any class in java.net.URLClassLoader
    • Teardown: Finish debugging session and delete the breakpoint
  3. Exception breakpoint condition
    1. Invoke action Run | New Breakpoint from menu
    2. Select Exception from Breakpoint type combobox
    3. Enter java.lang.ClassNotFoundException as a Exception Class Name
    4. Check Condition checkbox and write false to the textfield. Confirm the dialog.
    5. Invoke Debug Main Project action
    • EXPECTED RESULT: Breakpoint will not be hit.
    • Teardown: Finish debugging session and delete the breakpoint
  4. Exception breakpoint hit count
    1. Invoke action Run | New Breakpoint from menu
    2. Select Exception from Breakpoint type combobox
    3. Enter java.lang.ClassNotFoundException as a Exception Class Name
    4. Check Break when hit count checkbox, select equals to and write 2 to the textfield. Confirm the dialog.
    5. Invoke Debug Main Project action
    • EXPECTED RESULT: Debugger will stop only once (invoke Continue to check it) with log 'Exception breakpoint hit in java.net.URLClassLoader$1'.
    • Teardown: Finish debugging session and delete the breakpoint
  5. Exception breakpoint customize
    1. Invoke action Run | New Breakpoint from menu
    2. Select Exception from Breakpoint type combobox
    3. Enter java.lang.ClassNotFoundException as a Exception Class Name
    4. Select Caught or Uncaught from the Stop On combobox
    5. Press OK
    6. Invoke Debug Main Project action
    7. Debugger should stop on the breakpoint.
    8. Select the breakpoint in breakpoints view and invoke Customize action
    9. ChangeException Class Name to java.io.FileNotFoundException
    10. Invoke Continue action
    • EXPECTED RESULT: Breakpoint will be hit by caught FileNotFoundException.
    • Teardown: Finish debugging session and delete the breakpoint
  6. Print 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
    • EXPECTED RESULT: Debugger will stop on the breakpoint and the "Breakpoint Hit!" message will be printed to the Debugger Console
    • Teardown: Finish debugging session and delete the breakpoint

Test suite: 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.
  1. Thread 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
    • EXPECTED RESULT: Breakpoint will be hit by every started thread (see messsages in Debugger Console)
    • Teardown: Finish debugging session
  2. Stop on Thread Death
    • Setup: Proceed steps from Thread breakpoint testcase
    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
    • EXPECTED RESULT: Breakpoint will be hit by finished main thread after application startup and by finishing threads during closing the application
    • Teardown: Delete breakpoint
  3. Thread breakpoint hit count
    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. Check Break when hit count checkbox, select equals to and write 1 to the textfield. Confirm the dialog.
    6. Invoke Debug Main Project action
    • EXPECTED RESULT: Debugger Console will contain 'Thread breakpoint hit by thread main.' log.
  4. Print 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
    • EXPECTED RESULT: Breakpoint will be hit by every started thread. For each one "Thread thread_name started." will be printed to the Debugger Console.
    • Teardown: Finish debugging session and delete the breakpoint

Test suite: 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.
  1. Line Breakpoint
    1. Toggle breakpoint in a method body
    • EXPECTED RESULT: The line will be highlighted and red square will be shown on the left side of the line.
    • Teardown: Delete breakpoint
  2. Field Breakpoint
    1. Toggle breakpoint on first line of a class field definition
    • EXPECTED RESULT: Red triangle will be shown on left side of the line.
    • Teardown: Delete breakpoint
  3. Method Breakpoint
    1. Toggle breakpoint on first line of a method definition
    • EXPECTED RESULT: Red triangle will be shown on left side of the line.
    • Teardown: Delete breakpoint
  4. Multiple 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
    • EXPECTED RESULT: The line 52 will be highlighted red and two red squares will be shown on the left side of the line.
    • Teardown: Delete breakpoints
  5. Conditional breakpoint
    1. Toggle Line Breakpoint on some line
    2. Select the breakpoint and invoke Customize
    3. Change Condition to "i<5" and press OK
    • EXPECTED RESULT: The line will be highlighted red and part of red square will be shown on the left side of the line.
    • Teardown: Delete breakpoint
  6. Disabled breakpoint
    1. Toggle Line Breakpoint on some line
    2. Set Enabled property of this breakpoint to false
    • EXPECTED RESULT: The line will be highlighted gray and gray square will be shown on the left side of the line.
  7. Enable breakpoint
    1. Use disabled breakpoint from previous testcase
    2. Invoke popup menu above breakpint ikon in gutter in editor area and enable breakpint via clicking menu item Breakpoint > Enabled
    • EXPECTED RESULT: The line will be highlighted red and red square will be shown on the left side of the line.
    • Teardown: Delete breakpoint
  8. Disabled conditional breakpoint
    • Setup: Proceed steps from Conditioned breakpoint testcase
    1. Set Enabled property of this breakpoint to false
    • EXPECTED RESULT: The line will be highlighted gray and part of gray square will be shown on the left side of the line.
    • Teardown: Delete the breakpoint
  9. Current program counter
    1. Invoke Step Into action
    • EXPECTED RESULT: Line 236 will be highlighted green and green arrow will be shown on the left side of the line.
    • Teardown: Finnish debugging session
  10. Program counter and breakpoint
    1. Toggle line breakpoint on line 91
    2. Invoke Debug Main Project action
    • EXPECTED 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.
    • Teardown: Finnish debugging session and delete the breakpoint
  11. Program counter and multiple breakpoints
    • Setup: Proceed steps from Multiple breakpoints testcase
    1. Invoke Debug Main Project action
    • EXPECTED RESULT: Debugger will stop on line 52. Line 52 will be highlighted green and green and black arrow will be shown on the left side of the line. If you click on the black arrow the line will be highlighted red and two red squares will be shown in the gutter. Clicking on the black arrow will cycle between the green arrow and red squares.
    • Teardown: Finnish debugging session and delete the breakpoints
  12. Call site
    1. Toggle line breakpoint on line 101
    2. Invoke Debug Main Project action
    • EXPECTED 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.
    • Teardown: Finish debugging session and delete the breakpoint

Test suite: Sessions view

Purpose: Verifies Sessions view functionality
Setup: Start NetBeans IDE with clear userdir. Open Sessions view.
  1. Session 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 line breakpoint on line 101 in MemoryView.java
    • EXPECTED RESULT: Debugger will stop on the breakpoint and session state will be changed to Stopped
    • Teardown: Finish debugging session and delete the breakpoint
  2. Multiple sessions
    1. Open project MemoryView and set it as main project
    2. Toggle line 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 line 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"
    • EXPECTED RESULT: Sessions view will display two sessions - examples.advanced.MemoryView, tests.LineBreakpoints - both in Stopped state. The session tests.LineBreakpoints will have different icon (with thick black border). 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). There is not current pc annotation in file MemoryView.java.
    • Teardown: Finish debugging sessions, delete breakpoints and delete watches
  3. Switch to session
    • Setup: Proceed steps from Multiple sessions testcase
    1. Close source files MemoryView.java and LineBreakpoints.java in editor
    2. Select session examples.advanced.MemoryView and invoke Make Current action from its context menu
    • EXPECTED 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).
    • Teardown: Finish debugging sessions, delete breakpoints and delete watches
  4. Finish session
    • Setup: Proceed steps from Multiple sessions testcase
    1. Close source file MemoryView.java in editor
    2. Select session examples.advanced.MemoryView (current) and invoke Finish action from its context menu
    • EXPECTED RESULT: File LineBreakpoints.java will be opened in editor and current program counter annotation will be displayed on line 200. Sessions view shows only one debugger session tests.LineBreakpoints with current session icon.
    • Teardown: Finish debugging session, delete breakpoints and delete watches
  5. Finish all sessions
    • Setup: Proceed steps from Multiple sessions testcase
    1. Invoke Debug Main Project action
    2. Select session tests.LineBreakpoints and invoke Finish All action from its context menu
    • EXPECTED RESULT: Both debugging sessions will be closed.
    • Teardown: Delete breakpoints and delete watches
  6. Remote 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)
    • EXPECTED 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.
    • Teardown: Finish debugging session
  7. Remote 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
    • EXPECTED 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.
  8. Debug current thread
    1. Open ThreadSuspending.java file
    2. Place line breakpoin on line 39
    3. Start debugging by Debug File action
    4. Wait the breakpoint is hit, go to Sessions view, select current session and invoke its popup menu settings Scope | Debug Current Thread
    5. Invoke Step Over action a few times
    • EXPECTED RESULT: Debugged application will start with a few logs from Thread-1. After the session settings and Step Over actions there must be only logs from Thread-2 in output window.
  9. View columns
    • Setup: Use running remote session from Remote Session cases.
    1. Click small button right below view close button
    2. In SessionsView - Change Visible Columns dialog check Host Name checkbox
    3. Press OK
    • EXPECTED RESULT: Sessions view will display four columns: Name, State, Language, Host Name.
    • Teardown: Close all debugger sessions.

Test suite: 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.
  1. Name
    1. Invoke Debug Main Project action
    2. Wait until GUI of the MemoryView is shown
    3. Open Threads view and expand node system
    • EXPECTED RESULT: There will be thread with name TimerQueue.
    • Teardown: Finish debugging session
  2. State
    1. Invoke Debug Main Project action
    2. Wait until GUI of the MemoryView is shown
    3. Open Threads view and expand node system
    • EXPECTED RESULT: State of thread TimerQueue should be set to Waiting (this thread is spending a lot of its time by waiting).
    • Teardown: Finish debugging session
  3. Switch to thread
    1. Toggle line 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
    • EXPECTED RESULT: Call Stack view will show information about TimerQueue thread.
    • Teardown: Finish debugging session and delete the breakpoint
  4. Method name
    1. Toggle line 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
    • EXPECTED RESULT: Top call stack line will be MemoryView.updateStatus:106.
    • Teardown: Finish debugging session and remove breakpoint
  5. Suspend thread
    1. Invoke Debug Main Project action
    2. Select node TimerQueue in the Threads view
    3. Change Suspended property of this node to true using popup menu for thread node or checkbox in Suspended column. (Use customize view button and enable this column.)
    • EXPECTED RESULT: Progress bar of the MemoryView will freeze, but GUI will react to user actions (ensure Refresh Now, Garbage Collect and Close buttons are working)
    • Teardown: Finish debugging session
  6. Resume thread
    • Setup: Proceed steps from Suspend Thread testcase
    1. Set refresh time in the MemoryView application to 100 and click Apply
    2. Change suspended property of TimerQueue node to false
    • EXPECTED RESULT: Progress bar of the MemoryView will be moving again (10 times faster than before).
    • Teardown: Finish debugging session
  7. Monitors
    1. Select DeadlockTest.java in Projects view
    2. Invoke Run | Run File | Debug "DeadlockTest.java" menu
    3. Invoke Run | Pause after the application stops
    4. Expand nodes system | main | Thread-0 and Thread-1
    • EXPECTED RESULT: Thread-0 has Contended monitor with reference the same as Thread-1 has Owned monitor and vice versa, Thread-1 has Contended monitor with reference the same as Thread-0 has Owned monitor.
    • Teardown: Finish debugging session
  8. Go to source
    1. Toggle line breakpoint on line 106 of MemoryView.java
    2. Invoke Debug Main Project action
    3. Debugger will stop on the breakpoint after a while
    4. Close file in source editor
    5. Select node system | main | main in the Threads view
    6. Invoke Go To Source action from context menu of this node
    • EXPECTED RESULT: Source editor will be opened with file MemoryView.java and caret should be on line 106.
    • Teardown: Finish debugging session and delete the breakpoint
  9. View columns
    1. Click small button right below view close button
    2. In ThreadsView - Change Visible Columns dialog check Suspended checkbox
    3. Press OK
    • EXPECTED RESULT: Threads view will display three columns: Name, State, Suspended.
  10. Interrupt thread
    1. Toggle line breapoints on lines 39 and 59 of DeadlockTest.java
    2. Start debugging by Debug File action on the file
    3. Wait until debugger reaches the first breakpoint, press Step Over once or two times - depands on delay between the actions
    • EXPECTED RESULT: Debugger will jump to line 59, Threads view will be opened with information 'Step interrupted by a breakpoint in another thread' and buttons Ignore Breakpoints and Ignore All Such Breakpoints.
  11. Interrupt thread - Ignore Breakpoint
    • Setup: Continue with previous test case
    1. Press Ignore Breakpoint.
    2. Invoke Step Over action
    • EXPECTED RESULT: Debugger will jump to line 43 and continue with debugging of the method.
  12. Interrupt thread - Ignore All Breakpoints
    • Setup: Continue with test case Interrupt thread
    1. Press Ignore All Such Breakpoints.
    2. Invoke Step Over action
    • EXPECTED RESULT: Debugger will jump to line 43 and continue with debugging of the method.
  13. Interrupt thread - Ignore Nothing
    • Setup: Continue with test case Interrupt thread
    1. Invoke Step Over action a few times
    • EXPECTED RESULT: Debugger will jump to line 43, than back to line 61 and again to the first thread etc.

Test suite: Call Stack view

Purpose: Verifies Call Stack window functionality
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open file MemoryView.java in editor Open Call Stack view.
  1. Stack trace
    1. Toggle line breakpoint on line 101
    2. Invoke Debug Main Project action
    3. Debugger should stop on the breakpoint after a while
    4. Look at the content of the Call Stack view
    • EXPECTED RESULT: There will be three lines in the Call Stack view: "MemoryView.updateStatus:101" "MemoryView.<init>:58" "MemoryView.main:236"
    • Teardown: Finish debugging session and delete the breakpoint
  2. Hidden source calls
    • Setup: Proceed steps from Stack trace testcase
    1. Invoke Continue action
    2. Invoke Window | Debugging | Threads action
    3. Expand node System, main and doubleclick on node AWT-EventQueue
    • EXPECTED RESULT: Call Stack view will display top entry MemoryView.updateStatus:101 and last entry will be expandable node Hidden Source Calls. It will contain calls from JDK classes.
    • Teardown: Finish debugging session and delete the breakpoint
  3. Hidden source calls II
    • Setup: Proceed steps from Hidden source calls testcase
    1. Invoke Window | Debugging | Sources action
    2. Find line with path to JDK sources and check it to be used for debugging
    • EXPECTED RESULT: Call stack will display all entries and no Hidden Source Calls will be displayed
    • Teardown: Finish debugging session and delete the breakpoint
  4. Moving current frame
    1. Toggle line breakpoint on line 101
    2. Invoke Debug Main Project action
    3. Debugger should stop on the breakpoint after a while
    4. Create watch for expression free and check if it was evaluated
    5. Check if Local Variables view shows nodes: this, r, free, total, taken
    6. Select second line in Call Stack view and invoke Make Current from its context menu
    • EXPECTED RESULT: The watch will be marked as not know in the context. The Local Variables view will show only node this. The caret will be moved to line 58 of file MemoryView.java.
    • Teardown: Finish debugging session and delete the breakpoint
  5. Make caller current
    1. Place caret on line 121
    2. Invoke Run To Cursor action from menu or toolbar
    3. Wait until debugger is stopped on the line with caret
    4. Invoke Run | Stack | Make Caller Current action from menu
    • EXPECTED RESULT: Editor will scroll to line 45, which will be highlighted by lilac and gutter will show lilac triangle. Second frame in the Call Stack view will be highlighted.
    • Teardown: Finish debugging session
  6. Make callee current
    • Setup: Process steps from Make caller current testcase
    1. Invoke Run | Stack | Make Calee Current action from menu
    • EXPECTED RESULT: Editor will scroll back to line 121. Line will be highlighted same way as paused debugger and first frame will be hightlighted in Call Stack view.
    • Teardown: Finish debugging session
  7. Pop topmost call
    • Setup: Proceed step from Make caller current testcase
    1. Invoke Run | Stack | Pop topmost call action from menu
    • EXPECTED RESULT: Editor will scroll to line 45. Line will be highlighted green with green arrow in forn of it. Call Stack view will display only two entries: MemoryView.<init>:45, MemoryView.amin:236. First line will be highlighted.
    • Teardown: Finish debugging session
  8. Go to source
    1. Toggle line breakpoint on line 101
    2. Invoke Debug Main Project action
    3. Debugger should stop on the breakpoint after a while
    4. Close the file in editor
    5. Double-click on the top level call stack frame
    • EXPECTED RESULT: Source editor will show MemoryView.java and move caret to the line 101.
    • Teardown: Finish debugging session and delete the breakpoint
  9. View columns
    1. Click small button right below view close button
    2. In CallStackView - Change Visible Columns dialog check Location checkbox
    3. Press OK
    • EXPECTED RESULT: Call Stack view will display two columns: Name, Location

Test suite: Local Variables view

Purpose: Verifies Local Variables window functionality
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open file MemoryView.java in editor Open Local Variables view.
  1. Local variables
    1. Put caret on line 91
    2. Invoke Run To Cursor action
    • EXPECTED RESULT: Debugger will stop on line 91. Local Variables view will contain nodes this, r, free, total. Nodes this and r should be expandable.
    • Teardown: Finish debugging session
  2. Member variables
    • Setup: Proceed steps from Local Variables testcase
    1. Expand node this
    • EXPECTED RESULT: Variables view will contain node timer, Static, Inehrited and other nodes under node this. Ensure node this is not under node this again.
    • Teardown: Finish debugging session
  3. Static variables
    • Setup: Proceed steps from Member Variables testcase
    1. Expand node Static
    • EXPECTED RESULT: Nodes msgMemory, bundle and other nodes will be under node Static. Ensure node Static is not under node Static again.
    • Teardown: Finish debugging session
  4. Inherited variables
    • Setup: Proceed steps from Member Variables testcase
    1. Expand node Inherited
    • EXPECTED RESULT: Nodes of variables from javax.swing.JFrame will be under node Inherited. Ensure node Inherited is not under node Inherited again.
    • Teardown: Finish debugging session
  5. Go to source
    • Setup: Proceed steps from Member Variables testcase
    1. Close file MemoryView.java in editor
    2. Select node jPanel1 and invoke Go To Source from its context menu
    • EXPECTED RESULT: File MemoryView.java will be opened in editor. Caret will be on line 223.
    • Teardown: Finish debugging session
  6. Create fixed watch
    • Setup: Proceed steps from Member Variables testcase
    1. Select node r and invoke Create Fixed Watch from its context menu
    • EXPECTED RESULT: Node r will be in Watches view. Value of the node in watches view will be the same as in the Local Variables view.
    • Teardown: Finish debugging session
  7. View columns
    1. Click small button right below view close button
    2. In LocalsView - Change Visible Columns dialog check toString() checkbox
    3. Press OK
    • EXPECTED RESULT: Local Variables view will display four columns: Name, Type, Value, toString()
  8. Modify value
    1. Put caret on line 194 of MemoryView.java
    2. Invoke Run To Cursor action
    3. In MemoryView application press Apply button
    4. In Local Variables view doubleclick node rate
    5. Change its value to 10000
    6. Invoke Continue action
    • EXPECTED RESULT: The status of used memory will be updated every 10 seconds
    • Teardown: Finish debugging session
  9. Long arrays
    1. Open file LongArrays.java in editor
    2. Toggle line breakpoint on line 38
    3. Invoke Run|Run File|Debug "LongArrays.java" action
    • EXPECTED RESULT: Nodes a, i, s, v will be in Local variables. When the nodes will be expanded, there will be subnodes with ranges 0-99, 100-199 to 900-999. Under these subnodes will be actual array members with their values. Ensure all nodes are shown in the view and all values are correct (value is equal to index).
    • Teardown: Finish debugging session, remove breakpoint and close file

Test suite: Loaded Classes view

Purpose: Verifies Loaded Classes view functionality
Comments: Loaded Classes view was replaced by HeapWalker for JDK version 1.6.0 and newer.
Setup: Start NetBeans IDE with clear userdir on JDK 1.5 or older. Open project MemoryView and set it as main project. Open file MemoryView.java in editor. Open Loaded Classes view.
  1. Class loaders
    1. Put caret on line 91 of MemoryView.java
    2. Invoke Run To Cursor action
    • EXPECTED RESULT: There will be two nodes in Loaded Classes view: System Class Loader, Application Class Loader. The nodes will be expandable.
    • Teardown: Finish debugging session
  2. Package names
    1. Expand nodes System Class Loader and Application Class Loader
    • EXPECTED RESULT: There will be nodes with names com, java, javax, sun undes System Class Loader and node examples under Application Class Loader. The nodes will be expandable.
    • Teardown: Finish debugging session
  3. Inner classes
    1. Expand node Application Class Loader | examples.advanced | MemoryView
    • EXPECTED RESULT: There will be nodes with names 2, 3, 4, 5, 6. The nodes represent anonymous innner classes.
  4. View columns
    1. Click small button right below view close button
    2. In ClassesView - Change Visible Columns will be only one checkbox Name
    3. Press OK
    • EXPECTED RESULT: Loaded Classes view will display one column: Name
Teardown: Finish debugger session.

Test suite: HeapWalker

Purpose:
Setup: Start NetBeans IDE with clear userdir on JDK version 1.6.0 and newer. Open project MemoryView and set it as main project. Open file MemoryView.java in editor. Close other editor windows.
  1. Classes View
    1. Put caret on line 116
    2. Invoke Run To Cursor action
    3. Open Window | Debugging | Loaded Classes view
    4. Find javax.swing.JPanel class
    5. Invoke Step over action
    • EXPECTED RESULT: Instances number of javax.swing.JPanel is increased.
  2. Show Only Subclasses
    • Setup: Continue with test case Loaded Classes View
    1. Sort the classes by name and find javax.swing.JComponent class
    2. Call popup menu on the class and invoke Show Only Subclasses action.
    3. Subclass of filter is selected with javax.swing.JComponent in its combobox
    4. Watch javax.swing.JLabel class
    5. Invoke step over action
    • EXPECTED RESULT: One instance of javax.swing.JLabel is added to the classes list.
  3. Show in Instances View
    • Setup: Continue with test case Show Only Subclasses
    1. Select the javax.swing.JLabel class in Classes view and invoke Show in Instances View action
    • EXPECTED RESULT: There should be one item in Instances list, a tree with root node this and subnodes e.g. text, mnemonic and defaulticon in Fields view and tree with root node this and subnodes text (MemoryView) and source (PropertyChangheSupport) in References view.
  4. Show in Classes View
    • Setup: Continue with test case Show In Instances View
    1. Select field text in Fields view and invoke Show in Classes View action from its popup menu
    • EXPECTED RESULT: java.lang.String should be selected in Classes view
  5. Show Instance
    • Setup: Continue with test case Show In Instances View
    1. Put editor cursor on line 58 in editor of MemoryView.java and invoke Run to Cursor action
    2. Find javax.swing.JLabel in Classes view and show its instances
    3. Select the second instance of the javax.swing.JLabel
    4. Select field text in Fields view and invoke Show Instance action from its popup menu
    5. Instances of java.lang.String are shown in Instances view. An instance is selected with 'Refresh time:' value in its value field
    6. Select text (JLabel) in References view and invoke its Show Instance popup action
    • EXPECTED RESULT: Instances of javax.swing.JLabel are shown again with second instance selected.
  6. Go To Source
    • Setup: Continue with test case Show Instance
    1. Select txtTime (MemoryView) reference in References view
    2. Invoke Go To Source action from its popup menu
    • EXPECTED RESULT: MemoryView.java editor should be opened. Cursor should be moved on MemoryView class definition line.
Teardown: Finish debugger session, remove all breakpoints.

Test suite: Sources view

Purpose: Verifies Sources view functionality
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open file MemoryView.java in editor. Open Sources view.
  1. View columns
    1. Invoke Step Into action
    2. Click small button right below view close button
    3. In SourcesView - Change Visible Columns check Use for debugging checkbox
    4. Press OK
    • EXPECTED RESULT: Classes view will display two columns: Source Root / Filter and Use for debugging
  2. Default source roots
    • Setup: Proceed steps from View columns testcase
    • EXPECTED RESULT: Sources view will display following source roots:
      • <path to project>/MemoryView/src (project MemoryView)*
      • <path to project./MemoryView/test (project MemoryView)
      • <path to JDK>/src.zip
      • marks nodes used for debbuging. Jdk source root will be displayed only if JDK sources are available.
    • Teardown: Finish debugging session
  3. Do not use JDK sources
    • Setup: Setup JDK sources in Java Platform Manager
    1. Place caret on line 98
    2. Invoke Run to Cursor
    3. Ensure JDK sources are not checked to be used for debugging
    4. Invoke Step Into
    • EXPECTED RESULT: Debugger will stop on line 99.
    • Teardown: Finish debugger session
  4. Use JDK sources
    • Setup: Setup JDK sources in Java Platform Manager
    1. Place caret on line 98
    2. Invoke Run to Cursor
    3. Set JDK sources to be used for debugging
    4. Invoke Step Into
    • EXPECTED RESULT: Debugger will stop on JProgressBar.java on line 882 (for sun jdk 1.6.0).
    • Teardown: Finish debugging session
  5. Class exclusion filter
    • Setup: Setup JDK sources in Java Platform Manager
    1. Place caret on line 98
    2. Invoke Run to Cursor
    3. Set JDK sources to be used for debugging
    4. Invoke Add Class Exclusion Filter from context menu of Sources window
    5. In Add Class Exclusion Filter Dialog create filter javax.*
    6. Ensure the new filter is checked to be used for debugging
    7. Invoke Step Into
    • EXPECTED RESULT: Debugger will step over all code in javax package and will stop on Math.java on line 863 (for sun jdk 1.6.0).
    • Teardown: Finish debugging session
  6. Filters persistence
    • Setup: Proceed step from Class exclusion filter testcase
    1. Finish debugger session
    2. Restart IDE
    3. Place caret on line 98
    4. Invoke Run to Cursor
    • EXPECTED RESULT: In sources view following source roots and filters will exist:
      • <path to project>/MemoryView/src (project MemoryView) *
      • <path to project>/MemoryView/test (project MemoryView)
      • <path to JDK>/src.zip *
      • Do not stop in: javax.* *
      • * marks nodes used for debbuging.
    • Teardown: Finish debugging session

Test suite: Breakpoints view

Purpose: Verifies Breakpoints window 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.
  1. Add line breakpoint
    1. Toggle line breakpoint on line 91
    • EXPECTED RESULT: Breakpoint with name Line MemoryView.java:91 will be created. Icon of the breakpoint will be red sqaure.
    • Teardown: Delete breakpoint
  2. Remove line breakpoint
    • Setup: Proceed steps from Add line breakpoint testcase
    1. Toggle line breakpoint on line 91
    • EXPECTED RESULT: Breakpoint will be removed from breakpoints view.
  3. Add 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 and press OK
    • EXPECTED RESULT: Breakpoint with name Method MemoryView:updateStatus will be created. Icon of the breakpoint will be red triangle.
  4. Customize breakpoint
    • Setup: Proceed steps from Add method breakpoint testcase
    1. Invoke Customize action from the pop-up menu of the breakpoint node
    • EXPECTED RESULT: The Customize Breakpoint dialog must be shown
    • Teardown: Delete breakpoint
  5. Disable breakpoint
    1. Toggle line breakpoint on line 91
    2. Uncheck enabled property of breakpoint Line MemoryView.java:91 in Breakpoints view
    3. Invoke Debug Main Project action
    • EXPECTED RESULT: Application will be started and will not stop on the breakpoint.
    • Teardown: Finish debugging session and delete breakpoint
  6. Disable all breakpoints
    1. Open examples.advanced.MemoryView in source editor
    2. Toggle several breakpoints in editor gutter
    3. Create several non-line breakpoints - Run | New Breakpoint ...
    4. Invoke Disable All action from the pop-up menu of the Breakpoints window pane
    • EXPECTED RESULT: All breakpoint must have Enabled property set to "False".
  7. Enable all breakpoints
    1. Invoke Enable All action from the pop-up menu of the Breakpoints window pane
    • EXPECTED RESULT: All breakpoint must have Enabled property set to "True".
  8. Remove all breakpoints
    1. Select any breakpoint from Breakpoints view and invoke Delete All action from its context menu
    • EXPECTED RESULT: All breakpoints will be removed from breakpoints view.
  9. Add to group
    1. Toggle breakpoints on lines 86, 91, 101
    2. Select node Line MemoryView.java:86 in Breakpoints View and invoke Set Group Name action from its context menu
    3. In the dialog insert name group_a and press OK
    • EXPECTED RESULT: A group with name group_a will be created and it will contain tLine MemoryView.java:86 breakpoint. The breakpoint will not be visible in top level brekapoint list.
  10. Remove from group
    1. Select node Line MemoryView.java:91 and Line MemoryView.java:101 together and invoke Set Group Name action from their context menu
    2. In the dialog insert name group_b and press OK
    3. Expand node group_b
    4. Select node Line MemoryView.java:91 and invoke Set Group Name action from its context menu
    5. Do not insert name in the dialog and press OK
    • EXPECTED RESULT: Breakpoint Line MemoryView.java:91 will be removed from the group and will be displayed in toplevel breakpoints list.
    • Teardown: Delete all breakpoints
  11. Move to other group
    1. Toggle breakpoints on lines 86, 91, 101
    2. Select node Line MemoryView.java:86 and Line MemoryView.java:101 together and invoke Set Group Name action from their context menu
    3. In the dialog insert name group_a and press OK
    4. Expand node group_a
    5. Select node Line MemoryView.java:86 and invoke Set Group Name action from its context menu
    6. In the dialog insert name group_b and press OK
    • EXPECTED RESULT: Breakpoint Line MemoryView.java:86 will be removed from breakpoint group group_a. A group with name group_b will be created and it will contain breakpointLine MemoryView.java:86 breakpoint.
  12. Persistence - debugger start
    • Setup: Proceed steps from Move to other group testcase
    1. Uncheck enabled property of breakpoint Line MemoryView.java:86
    2. Invoke Debug Main Project action
    • EXPECTED RESULT: Debugger will stop on breakpoint on line 91. When debugging session is Finished, breakpoints will be in same groups as before debugger start.
  13. Persistence - restart IDE
    • Setup: Proceed steps from Move to other group testcase
    1. Uncheck enabled property of breakpoint Line MemoryView.java:86
    2. Select node Line MemoryView.java:101 and invoke Customize action from its context menu
    3. Check Condition checkbox and set condition value to true
    4. Put caret on line 62
    5. Invoke action Run | New Breakpoint from menu
    6. In New Breakpoint dialog set Breakpoint Type to Method and press OK
    7. Select variable timer on line 38 (doubleclick on the variable name or select variable name in editor)
    8. Invoke action Run | New Breakpoint from menu
    9. Ensure the Stop on is set to Field Access and press OK
    10. Restart IDE
    • EXPECTED RESULT: All breakpoints will be same as before IDE restart
    • Teardown: Delete all breakpoints
  14. Breakpoint highlighting
    1. Toggle line breakpoint on line 91 and 107
    2. Invoke Debug Main Project action
    3. When debugger stops on line 91, invoke Continue action
    • EXPECTED RESULT: Breakpoint Line MemoryView.java:91 is diplayed in plain text. Breakpoint Line MemoryView.java:107 is displayed in bold text.
    • Teardown: Finish debugging session and delete all breakpoints
  15. View columns
    1. Click small button right below view close button
    2. In BreakpointsView - Change Visible Columns dialog check Enabled checkbox
    3. Press OK
    • EXPECTED RESULT: Breakpoints view will display two columns: Name, Enabled

Test suite: Watches view

Purpose: Verifies Watches view functionality
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open file MemoryView.java in editor. Open Watches view.
  1. View columns
    1. Click small button right below view close button
    2. In WatchesView - Change Visible Columns dialog check toString() checkbox
    3. Press OK
    • EXPECTED RESULT: Watches view will display four columns: Name, Type, Value, toString()
  2. Add simple watch
    1. Invoke Run | New Watch ... menu
    2. Enter name of the watch taken
    • EXPECTED RESULT: Watches view will show node with name taken. Other columns of the view will be empty.
  3. Add watch expression
    1. Invoke Run | New Watch ... menu
    2. Enter name of the watch System.getProperty("java.version")
    • EXPECTED RESULT: Watches view will show node with name System.getProperty("java.version"). Other columns of the view will be empty.
  4. Add object watch
    1. Invoke Run | New Watch ... menu
    2. Enter name of the watch bundle
    • EXPECTED RESULT: Watches view will show node with name bundle. Other columns of the view will be empty.
  5. Watches functionality
    1. Put caret on line 101
    2. Invoke Run to Cursor action
    • EXPECTED RESULT: Watches view will show nodes with names taken, System.getProperty("java.version") and bundle with types int, String and PorpertyReourceBundle. Value and toString() will show values of the first two watches and both columns will show the same value. Value for bundle will be its instance number. The third node will be expandable and it will contain nodes Static, Inherited, lookup.
    • Teardown: Finish debugging session
  6. Delete
    • Setup: Continue after Watches functionality testcase
    1. Select watch node with name System.getProperty("java.version")
    2. Invoke Delete action from pop-up menu
    • EXPECTED RESULT: The watch node will be deleted.
  7. Delete all
    • Setup: Continue after Delete testcase
    1. Put caret on line 101
    2. Invoke Run to Cursor action
    3. Select watch node with name bundle
    4. Invoke Create Fixed Watch action from its pop-up menu
    5. Select watch node with name taken
    6. Invoke