Debugger Test Specification for NetBeans 5.5
Author: Lubomir Cincura, Emanuel Hucka
Version: 1.1
Last update: 2007/03/12
| Introduction: | Debuggercore module provides basic framework for implementations of debuggers in IDE. 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. Test cases needs classes not delivered with IDE, they can be found here. |
| Comments: | |
Table of Contents
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 |
-
Window menu
- Expand menu Window from the main menu
-
EXPECTED RESULT: Menu Window contains folowing submenu items:
- Debugging (with submenu)
- Local Variables
- Watches
- Call Stack
- Classes
- Breakpoints
- Sessions
- Threads
- Sources
-
Run menu
- 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 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 Breakpoint
- New Breakpoint
- New Watch
- Evaluate Expression
-
View menu
- Expand View | Toolbars menu from the main menu
-
EXPECTED RESULT: The following menu item must be presented in Toolbars menu:
Test suite: Toolbars
| Purpose: | Test suite verifies content of debugger toolbar |
| Setup: | Start NetBeans IDE with clear userdir. |
-
Build toolbar
- Open View | Toolbars and check Build menu item
-
EXPECTED RESULT: Make sure that following toolbar buttons are presented (use a hint of a particular button) in Build toolbar:
- Debug Main Project
- Attach Debugger... *
. And only Attach Debugger is enabled.
| Teardown: | Invoke View | Toolbars and unselect Debug menu item. |
-
Debugger toolbar
- 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 Into
- Step Out
- Run to Cursor
- Apply Code Changes
- New Watch... *
- HTTP Monitor *
-
Enabling actions I
- Open MemoryView project
-
EXPECTED RESULT: Make sure that following toolbar buttons are enabled in Build toolbar:
- Debug Main Project
- Attach Debugger...
Make sure that following toolbar buttons are enabled in Debugger toolbar:
- Step Into
- New Watch...
- HTTP Monitor
-
Enabling actions II
- Open source file MemoryView.java in editor
-
EXPECTED RESULT: Make sure that following toolbar buttons are enabled in Debugger toolbar:
- Step Into
- Run to Cursor
- New Watch...
- HTTP Monitor
Test suite: Editor
| Purpose: | This test suite verifies Editor popup menu |
| Setup: | Start NetBeans IDE with clear userdir. |
-
Editor popup menu
- Open project MemoryView
- Open file MemoryView.java in editor
- Invoke popup menu in editor area
-
EXPECTED RESULT: Make sure that following menu items are presented:
- Run File
- New Watch...
- Toggle Breakpoint
Test suite: Debugger views
| Purpose: | Tests of debugger views existence and persistence |
| Setup: | Start NetBeans IDE with clear userdir |
-
Local variables
- Invoke Window | Debugging | Local Variables
-
EXPECTED RESULT: Local Variables view (tab) is opened in area below the editor
-
Watches
- Invoke Window | Debugging | Watches
-
EXPECTED RESULT: Watches view (tab) is opened in area below the editor
-
Call Stack
- Invoke Window | Debugging | Call Stack
-
EXPECTED RESULT: Call Stack view (tab) is opened in area below the editor
-
Classes
- Invoke Window | Debugging | Classes
-
EXPECTED RESULT: Classes view (tab) is opened in area below the editor
-
Breakpoints
- Invoke Window | Debugging | Breakpoints
-
EXPECTED RESULT: Breakpoints view (tab) is opened in area below the editor
-
Sessions
- Invoke Window | Debugging | Sessions
-
EXPECTED RESULT: Sessions view (tab) is opened in area below the editor
-
Threads
- Invoke Window | Debugging | Threads
-
EXPECTED RESULT: Threads view (tab) is opened in area below the editor
-
Sources
- Invoke Window | Debugging | Sources
-
EXPECTED RESULT: Sources view (tab) is opened in area below the editor
-
View persistence - restart debugger
- Start debugging session
- Open some debugger views from Window | Debug menu and arrange the views (try to use as many features of window system as possible)
- Finish debugging session
- 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 |
-
View persistence - restart IDE
- Open some debugger views from Window | Debug menu and arrange the views (try to use as many features of window system as possible)
- 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. |
-
Start debugger
- 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 |
-
Stop debugged application
- Invoke Debug Main Project action from menu or toolbar, wait until debugger and application are started
- 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.
-
Kill debugged application
- Invoke Debug Main Project action from menu or toolbarr, wait until debugger and application are started
- 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.
-
Pause debugging session
- Invoke Debug Main Project action from menu or toolbarr, wait until debugger and application are started
- 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.
-
Continue debugging session
| Setup: | Process steps from Pause debugging session testcase |
- 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 |
-
Breakpoint functionality
- Open file MemoryView.java in editor
- Place your caret on line 101
- Invoke Toggle Breakpoint breakpoint from editor's popup menu
- 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 |
-
Run to cursor
| Setup: | Proceed steps from Breakpoint functionality tescase |
- Place your caret on line 96
- 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 |
-
Run to cursor - start debugging
- Open file MemoryView.java in editor
- Place your caret on line 101
- 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 |
-
Step Into - start debugging
- 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 |
-
Step Into
- Open file MemoryView.java in editor
- Place your caret on line 58
- Invoke Toggle Breakpoint breakpoint from editor's popup menu
- Invoke Debug Main Project action from menu or toolbar
- Wait till debugger stops on line 58
- Invoke Step Into action
-
EXPECTED RESULT: Debugger will stop on line 86.
| Teardown: | Finish debugging session |
-
Step Over
- Invoke Debug Main Project action from menu or toolbar
- Wait till debugger stops on line 58
- Invoke Step Over action
-
EXPECTED RESULT: Debugger will stop on line 60.
| Teardown: | Finish debugging session |
-
Step Out
- Invoke Debug Main Project action from menu or toolbar
- Wait till debugger stops on line 58
- Invoke Step Into action
- Wait till debugger stops on line 86
- Invoke Step Out action
-
EXPECTED RESULT: Debugger will stop on line 60.
| Teardown: | Finish debugging session |
-
Run Into Method
- Invoke Debug Main Project action from menu or toolbar
- Wait till debugger stops on line 58
- Place your caret on line 58 between 9th and 21st character (text updateStatus)
- Invoke Run Into Method action from main menu
-
EXPECTED RESULT: Debugger will stop on line 86.
| Teardown: | Finish debugging session and remove breakpoint |
-
Run Into Method - JDK method
- Place your caret on line 193
- Invoke Toggle Breakpoint breakpoint from editor's popup menu
- Invoke Debug Main Project action from menu or toolbar
- In MemoryView application press Apply button and wait till debugger stops on line 193
- Invoke Window|Debugging|Sources
- In Sources view check the java sources to be used for debugging (<JAVA_HOME>/src.zip)
- Place your caret on line 193 between 56th and 64st character (text intValue)
- 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 |
-
Run Into Method without source
- Invoke Debug Main Project action from menu or toolbar
- In MemoryView application press Apply button and wait till debugger stops on line 193
- Place your caret on line 193 between 56th and 64st character (text intValue)
- Assure in sources view the java sources are not used for debugging
- 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 |
-
Kill paused debugged application
- Invoke Debug Main Project action from menu or toolbarr, wait until debugger and application are started
- Invoke Pause action from menu or toolbar
- 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
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. |
-
Pre-filled class name
- Put caret anywhere inside class MemoryView
- Invoke action Run | New Breakpoint from menu
- In New Brakpoint dialog set Breakpoint Type to Method
-
EXPECTED RESULT: Check settings in New Breakpoint dialog: Package Name will be set to examples.advaced Class Name will be set to MemoryView
| Teardown: | Cancel the dialog |
-
Pre-filled name of method
- Put caret on line 80
- Invoke action Run | New Breakpoint from menu
- In New Brakpoint dialog set Breakpoint Type to Method
-
EXPECTED 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
| Teardown: | Cancel the dialog |
-
Pre-filled name of constructor
- Put caret on line 50
- Invoke action Run | New Breakpoint from menu
- In New Brakpoint dialog set Breakpoint Type to Method
-
EXPECTED 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
| Teardown: | Cancel the dialog |
-
Pre-filled name of initializer
- Put caret on line 38
- Invoke action Run | New Breakpoint from menu
- In New Brakpoint dialog set Breakpoint Type to Method
-
EXPECTED 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>
| Teardown: | Cancel the dialog |
-
Method breakpoint on method
- Put caret on line 95
- Invoke action Run | New Breakpoint from menu
- In New Breakpoint dialog set Breakpoint Type to Method and press OK
- 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.
| Teardown: | Finish debugging session and delete the breakpoint |
-
Method breakpoint on constructor
- Put caret on line 62
- Invoke action Run | New Breakpoint from menu
- In New Breakpoint dialog set Breakpoint Type to Method and press OK
- 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 44 in MemoryView.
| Teardown: | Finish debugging session and delete the breakpoint |
-
Method breakpoint on initializer
- Put caret on line 40
- Invoke action Run | New Breakpoint from menu
- In New Breakpoint dialog set Breakpoint Type to Method and press OK
- 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 44 in MemoryView.
| Teardown: | Finish debugging session and delete the breakpoint |
-
Method breakpoint on static method
- Put caret on line 241
- Invoke action Run | New Breakpoint from menu
- In New Breakpoint dialog set Breakpoint Type to Method and press OK
- 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 |
-
Method breakpoint on all methods
- Put caret on line 91
- Invoke action Run | New Breakpoint from menu
- In New Breakpoint dialog set Breakpoint Type to Method
- Check All Methods for Given Classes and press OK
- Invoke Debug Main Project action
-
EXPECTED RESULT: Debugger will stop at MemoryView 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 the breakpoint |
-
Conditional method breakpoint
- Put caret on line 95
- Invoke action Run | New Breakpoint from menu
- In New Breakpoint dialog set Breakpoint Type to Method
- Set Condition property to false and press OK
-
EXPECTED RESULT: Debugger will not stop at the breakpoint
| Teardown: | Finish debugging session and delete the breakpoint |
-
Print text
- Put caret on line 91
- Invoke action Run | New Breakpoint from menu
- In New Breakpoint dialog set Breakpoint Type to Method and press OK
- Change Print Text to "Breakpoint Hit!".
- 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. |
-
Pre-filled class name
- Put caret anywhere inside class MemoryView
- Invoke action Run | New Breakpoint from menu
- In New Brakpoint dialog set Breakpoint Type to Variable
-
EXPECTED RESULT: Check settings in New Breakpoint dialog: Package Name will be set to examples.advaced Class Name will be set to MemoryView
-
Pre-filled field name in decalration
- Put caret on line 30, on column 34 to 43
- Invoke action Run | New Breakpoint from menu
-
EXPECTED 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
-
Pre-filled field name in code
- Select variable bundle on line 39 (doubleclick on the variable name or select variable name in editor)
- Invoke action Run | New Breakpoint from menu
-
EXPECTED 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
-
Stop on variable access
- Select variable timer on line 38 (doubleclick on the variable name or select variable name in editor)
- Invoke action Run | New Breakpoint from menu
- Ensure the Stop on is set to Variable Access and press OK
- Invoke Debug Main Project action
-
EXPECTED 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.
| Teardown: | Finish debugging session and delete the breakpoint |
-
Stop on variable modification
- Select variable timer on line 38 (doubleclick on the variable name or select variable name in editor)
- Invoke action Run | New Breakpoint from menu
- Ensure the Stop on is set to Variable Modification and press OK
- Invoke Debug Main Project action
-
EXPECTED 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.
| Teardown: | Finish debugging session and delete the breakpoint |
-
Print text
- Select variable timer on line 38 (doubleclick on the variable name or select variable name in editor)
- Invoke action Run | New Breakpoint from menu
- Set Print text to Breakpoint Hit! and press OK
- 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 |
-
Conditional variable breakpoint
- Select variable timer on line 38 (doubleclick on the variable name or select variable name in editor)
- Invoke action Run | New Breakpoint from menu
- Ensure the Stop on is set to Variable Access
- Change Condition property to false and press OK
-
EXPECTED RESULT: Debugger will not stop on the breakpoint.
| 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. |
-
Pre-filled values
- Put caret into body of the class MemoryView
- Invoke action Run | New Breakpoint from menu
- Select Class from Breakpoint type combobox
-
EXPECTED RESULT: Check settings in New Breakpoint dialog: Package Name will be set to examples.advaced Class Name will be set to MemoryView
-
Class filter
- Put caret into body of the class MemoryView
- Invoke action Run | New Breakpoint from menu
- Select Class from Breakpoint type combobox
- Enter MemoryView* as a Class Name
- Set Suspend Debugging combobox to No Thread (continue)
- Press OK
- 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.
| Teardown: | Finish debugging session and delete the breakpoint |
-
Exclusion filter on
- Invoke action Run | New Breakpoint from menu
- Select Class from Breakpoint type combobox
- Enter java as a Package Name
- Enter * as a Class Name
- Set Suspend Debugging combobox to No Thread (continue)
- Ensure Exclusion Filter checkbox is unchecked
- Press OK
- Invoke Debug Main Project action
-
EXPECTED RESULT: Breakpoint will be hit many times by loaded classes that belong to java package. Application will be started.
| Teardown: | Finish debugging session and delete the breakpoint |
-
Exclusion filter off
- Invoke action Run | New Breakpoint from menu
- Select Class from Breakpoint type combobox
- Enter java as a Package Name
- Enter * as a Class Name
- Set Suspend Debugging combobox to No Thread (continue)
- Ensure Exclusion Filter checkbox is checked
- Press OK
- Invoke Debug Main Project action
-
EXPECTED RESULT: Breakpoint will be hit many times by loaded classes that don't belong to java package. Application will be started.
| Teardown: | Finish debugging session and delete the breakpoint |
-
Print text
- Put caret into body of the class MemoryView
- Invoke action Run | New Breakpoint from menu
- Select Class from Breakpoint type combobox
- Enter MemoryView* as a Class Name
- Change Print Text to Breakpoint Hit!
- Press OK
- 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 |
-
Stop on main class
- Put caret into body of the class MemoryView
- Invoke action Run | New Breakpoint from menu
- Select Class from Breakpoint type combobox and press OK
- Invoke Debug Main Project action
-
EXPECTED 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.
| 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. |
-
Exception breakpoint
- Invoke action Run | New Breakpoint from menu
- Select Exception from Breakpoint type combobox
- Enter java.lang as a Package Name
- Enter ClassNotFoundException as a Exception Class Name
- Select Caught or Uncaught from the Stop On combobox
- Press OK
- Invoke Debug Main Project action
- Debugger should stop on the breakpoint.
- Select the breakpoint in breakpoints view and invoke Customize action
- Change Package Name to java.io
- Change Exception Class Name to FileNotFoundException
- Invoke Continue action
-
EXPECTED RESULT: Breakpoint will be hit by caught FileNotFoundException.
| Teardown: | Finish debugging session and delete the breakpoint |
-
Stop on event
- Invoke action Run | New Breakpoint from menu
- Select Exception from Breakpoint type combobox
- Enter java.lang as a Package Name
- Enter ClassNotFoundException as a Exception Class Name
- Select Caught from the Stop On combobox
- Press OK
- Invoke Debug Main Project action
- Debugger should stop on the breakpoint
- Select the breakpoint in breakpoints view and invoke Customize action
- Select Uncaught from the Stop On combobox
- Invoke Continue action
-
EXPECTED RESULT: Debugger will not stop on the breakpoint any more and application will be started
| Teardown: | Finish debugging session and delete the breakpoint |
-
Print text
- Invoke action Run | New Breakpoint from menu
- Select Exception from Breakpoint type combobox
- Enter java.lang as a Package Name
- Enter ClassNotFoundException as a Exception Class Name
- Select Caught or Uncaught from the Stop On combobox
- Change Print Text to Breakpoint Hit!
- Press OK
- 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. |
-
Thread breakpoint
- Invoke action Run | New Breakpoint from menu
- Select Thread from Breakpoint type combobox
- Select Thread Start from Set Breakpoint On combobox.
- Select No thread (continue) from Suspend debugging combobox
- Press OK
- Invoke Debug Main Project action
-
EXPECTED RESULT: Breakpoint will be hit by every started thread (see messsages in Debugger Console)
| Teardown: | Finish debugging session |
-
Set on event
| Setup: | Proceed steps from Thread breakpoint testcase |
- Select thread breakpoint in Breakpoints view and invoke Customize
- Select Thread Death from Set Breakpoint On combobox.
- Press OK
- Invoke Debug Main Project action
- Close MemoryView application by clicking on its Close button
-
EXPECTED RESULT: Breakpoint will be hit by finishing threads
| Teardown: | Delete breakpoint |
-
Print text
- Invoke action Run | New Breakpoint from menu
- Select Thread from Breakpoint type combobox
- Select Thread Start from Set Breakpoint On combobox
- Change Print Text to Thread {threadName} started.
- Select No thread (continue) from Suspend debugging combobox
- Press OK
- 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. |
-
Breakpoint
- Toggle breakpoint on some line
-
EXPECTED RESULT: The line will be highlighted and red square will be shown on the left side of the line.
| Teardown: | Delete breakpoint |
-
Multiple breakpoints
- Toggle breakpoints on line 52 and 53
- Select the breakpoint on line 53 and invoke Customize
- 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 |
-
Conditional breakpoint
- Toggle Breakpoint on some line
- Select the breakpoint and invoke Customize
- 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 |
-
Disabled breakpoint
- Toggle Breakpoint on some line
- 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.
| Teardown: | Delete breakpoint |
-
Disabled conditional breakpoint
| Setup: | Proceed steps from Conditional breakpoint testcase |
- 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 |
-
Current program counter
- 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 |
-
Program counter and breakpoint
- Toggle breakpoint on line 91
- 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 |
-
Program counter and multiple breakpoints
| Setup: | Proceed steps from Multiple breakpoints testcase |
- Invoke Debug Main Project action
-
EXPECTED 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.
| Teardown: | Finnish debugging session and delete the breakpoints |
-
Call site
- Toggle breakpoint on line 101
- 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. |
-
Session state
- Open project MemoryView and set it as main project
- Invoke Debug Main Project action
- State of the session examples.advanced.MemoryView will be Running
- Toggle 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 |
-
Multiple sessions
- Open project MemoryView and set it as main project
- Toggle breakpoint on line 91 of file MemoryView.java
- Invoke Run | New Watch and create watch expression free
- Invoke Debug Main Project action
- Toggle breakpoint on line 200 of file LineBreakpoints.java
- Invoke Run | New Watch and create watch expression n
- 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 |
-
Switch to session
| Setup: | Proceed steps from Multiple sessions testcase |
- Close source files MemroyView.java and LineBreakpoints.java in editor
- 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 |
-
Finish session
| Setup: | Proceed steps from Multiple sessions testcase |
- Close source file MemroyView.java in editor
- 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 |
-
Finish all sessions
| Setup: | Proceed steps from Multiple sessions testcase |
- Invoke Debug Main Project action
- 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 |
-
Remote session - listening
- Invoke "Attach Debugger..." action
- Select SocketListenfrom Connector combo box
- Type localhost in Local address edit box
- Type 1234 in Port edit box and press OK
- 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 |
-
Remote session - attaching
- Execute MemoryView from console (use switches -Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:1234,server=y)
- Invoke "Attach Debugger..." action
- Select SocketAttachfrom Connector combo box
- Type localhost in Host edit box
- 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.
-
View columns
| Setup: | Use running remote session from Remote Session cases. |
- Click small button right below view close button
- In SessionsView - Change Visible Columns dialog check Host Name checkbox
- 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 |
| Comment: | TODO: this should be rewritten after fix of issue 96519. |
| Setup: | Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open Threads view. |
-
Name
- Invoke Debug Main Project action
- Wait until GUI of the MemoryView is shown
- Open Threads view and expand nodes system and main
-
EXPECTED RESULT: There will be thread with name TimerQueue.
| Teardown: | Finish debugging session |
-
State
- Invoke Debug Main Project action
- Wait until GUI of the MemoryView is shown
- Open Threads view and expand nodes system and main
-
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 |
-
Switch to thread
- Toggle breakpoint on line 106 of file MemoryView.java
- Invoke Run | New Watch and create watch expression free
- Invoke Debug Main Project action
- Debugger should stop on the breakpoint after a while
- Select node TimerQueue in the Threads view
- 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 |
-
Method name
- Toggle breakpoint on line 106
- Invoke Debug Main Project action
- Debugger should stop on the breakpoint after a while
- Select node AWT-EventQueue in the Threads view
- Invoke Window | Debugging | Call Stack action
-
EXPECTED RESULT: Top call stack line will be MemoryView.UpdateStatus:106.
| Teardown: | Finish debugging session and remove breakpoint |
-
Suspend thread
- Invoke Debug Main Project action
- Select node TimerQueue in the Threads view
- Change Suspended property of this node to true
-
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 |
-
Resume thread
| Setup: | Proceed steps from Suspend Thread testcase |
- Set refresh time in the MemoryView application to 100 and click Apply
- 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 |
-
Monitors
- Select DeadlockTest.java in Projects view
- Invoke Run | Run File | Debug "DeadlockTest.java" menu
- Invoke Run | Pause after the application stops
- 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 |
-
Go to source
- Toggle breakpoint on line 106
- Invoke Debug Main Project action
- Debugger should stop on the breakpoint after a while
- Close file in source editor
- Select node main in the Threads view
- 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 |
-
View columns
- Click small button right below view close button
- In ThreadsView - Change Visible Columns dialog check Suspended checkbox
- Press OK
-
EXPECTED RESULT: Threads view will display three columns: Name, State, Suspended.
-
Interrupt thread
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. |
-
Stack trace
- Toggle breakpoint on line 101
- Invoke Debug Main Project action
- Debugger should stop on the breakpoint after a while
- Look at the content of the Call Stack view
-
EXPECTED RESULT: There will be three lines in the Call Stack view:
MemoryView.updateStatus:106 MemoryView.<init>:58 MemoryView.main:236
| Teardown: | Finish debugging session and delete the breakpoint |
-
Hidden source calls
| Setup: | Proceed steps from Stack trace testcase |
- Invoke Continue action
- Invoke Window | Debugging | Threads action
- 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 |
-
Hidden source calls II
| Setup: | Proceed steps from Hidden source calls testcase |
- Invoke Window | Debugging | Sources action
- 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 |
-
Moving current frame
- Toggle breakpoint on line 101
- Invoke Debug Main Project action
- Debugger should stop on the breakpoint after a while
- Create watch for expression free and check if it was evaluated
- Check if Local Variables view shows nodes: this, r, free, total, taken
- 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 |
-
Make caller current
- Place caret on line 121
- Invoke Run To Cursor action from menu or toolbar
- Wait until debugger is stopped on the line with caret
- 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 |
-
Make callee current
| Setup: | Process steps from Make caller current testcase |
- 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 |
-
Pop topmost call
| Setup: | Proceed step from Make caller current testcase |
- 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 |
-
Go to source
- Toggle breakpoint on line 101
- Invoke Debug Main Project action
- Debugger should stop on the breakpoint after a while
- Close the file in editor
- 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 |
-
View columns
- Click small button right below view close button
- In CallStackView - Change Visible Columns dialog check Location checkbox
- 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. |
-
Local variables
- Put caret on line 91
- 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 |
-
Member variables
| Setup: | Proceed steps from Local Variables testcase |
- 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 |
-
Static variables
| Setup: | Proceed steps from Member Variables testcase |
- Expand node Static
-
EXPECTED RESULT: Nodes mgsMemory, bundle and other nodes will be under node Static. Ensure node Static is not under node Static again.
| Teardown: | Finish debugging session |
-
Inherited variables
| Setup: | Proceed steps from Member Variables testcase |
- 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 |
-
Go to source
| Setup: | Proceed steps from Member Variables testcase |
- Close file MemoryView.java in editor
- 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 |
-
Create fixed watch
| Setup: | Proceed steps from Member Variables testcase |
- Select node free and invoke Create Fixed Watch from its context menu
-
EXPECTED RESULT: Node free 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 |
-
View columns
- Click small button right below view close button
- In LocalsView - Change Visible Columns dialog check toString() checkbox
- Press OK
-
EXPECTED RESULT: Local Variables view will display four columns: Name, Type, Value, toString()
-
Modify value
- Put caret on line 194 of MemoryView.java
- Invoke Run To Cursor action
- In MemoryView application press Apply button
- In Local Variables view doubleclick node rate
- Change its value to 10000
- Invoke Continue action
-
EXPECTED RESULT: The status of used memory will be updated every 10 seconds
| Teardown: | Finish debugging session |
-
Long arrays
- Open file LongArrays.java in editor
- Toggle breakpoint on line 38
- 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: Classes view
| Purpose: | Verifies Classes 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 Classes view. |
-
Class loaders
- Put caret on line 91 of MemoryView.java
- Invoke Run To Cursor action
-
EXPECTED RESULT: There will be two nodes in Classes view: System Class Loader, Application Class Loader. The nodes will be expandable.
| Teardown: | Finish debugging session |
-
Package names
- 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 |
-
Inner classes
- 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.
-
View columns
- Click small button right below view close button
- In ClassesView - Change Visible Columns will be only one checkbox Name
- Press OK
-
EXPECTED RESULT: Classes view will display one column: Name
| Teardown: | Finish debugger session. |
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. |
-
View columns
- Invoke Step Into action
- Click small button right below view close button
- In SourcesView - Change Visible Columns check Use for debugging checkbox
- Press OK
-
EXPECTED RESULT: Classes view will display two columns: Source Root / Filter and Use for debugging
-
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 |
-
Do not use JDK sources
| Setup: | Setup JDK sources in Java Platform Manager |
- Place caret on line 98
- Invoke Run to Cursor
- Ensure JDK sources are not checked to be used for debugging
- Invoke Step Into
-
EXPECTED RESULT: Debugger will stop on line 99.
| Teardown: | Finish debugger session |
-
Use JDK sources
| Setup: | Setup JDK sources in Java Platform Manager |
- Place caret on line 98
- Invoke Run to Cursor
- Set JDK sources to be used for debugging
- Invoke Step Into
-
EXPECTED RESULT: Debugger will stop on JProgressBar.java on line 882 (for sun jdk 1.6.0).
| Teardown: | Finish debugging session |
-
Class exclusion filter
| Setup: | Setup JDK sources in Java Platform Manager |
- Place caret on line 98
- Invoke Run to Cursor
- Set JDK sources to be used for debugging
- Invoke Add Class Exclusion Filter from context menu of Sources window
- In Add Class Exclusion Filter Dialog create filter javax.*
- Ensure the new filter is checked to be used for debugging
- 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 |
-
Filters persistence
| Setup: | Proceed step from Class exclusion filter testcase |
- Finish debugger session
- Restart IDE
- Place caret on line 98
- 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. |
-
Add line breakpoint
- Toggle 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 |
-
Remove line breakpoint
| Setup: | Proceed steps from Add line breakpoint testcase |
- Toggle breakpoint on line 91
-
EXPECTED RESULT: Breakpoint will be removed from breakpoints view.
-
Add method breakpoint
- Put caret on line 95
- Invoke action Run | New Breakpoint from menu
- 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.
-
Customize breakpoint
| Setup: | Proceed steps from Add method breakpoint testcase |
- Invoke Customize action from the pop-up menu of the breakpoint node
- Double click on any non-line breakpoint in Breakpoints view
-
EXPECTED RESULT: In both cases Customize Breakpoint dialog must be shown
| Teardown: | Delete breakpoint |
-
Dissable breakpoint
- Toggle breakpoint on line 91
- Uncheck enabled property of breakpoint Line MemoryView.java:91 in Breakpoints view
- 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 |
-
Disable all breakpoints
- Open
examples.advanced.MemoryView in source editor
- Toggle several breakpoints in editor gutter
- Create several non-line breakpoints - Run | New Breakpoint ...
- 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".
-
Enable all breakpoints
- 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".
-
Remove all breakpoints
- 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.
-
Add to group
- Toggle breakpoints on lines 86, 91, 101
- Select node Line MemoryView.java:86 in Breakpoints View and invoke Set Group Name action from its context menu
- 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.
-
Remove from group
- Select node Line MemoryView.java:91 and Line MemoryView.java:101 together and invoke Set Group Name action from their context menu
- In the dialog insert name group_b and press OK
- Expand node group_b
- Select node Line MemoryView.java:91 and invoke Set Group Name action from its context menu
- 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 |
-
Move to other group
- Toggle breakpoints on lines 86, 91, 101
- Select node Line MemoryView.java:86 and Line MemoryView.java:101 together and invoke Set Group Name action from their context menu
- In the dialog insert name group_a and press OK
- Expand node group_a
- Select node Line MemoryView.java:86 and invoke Set Group Name action from its context menu
- 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.
-
Persistence - debugger start
| Setup: | Proceed steps from Move to other group testcase |
- Uncheck enabled property of breakpoint Line MemoryView.java:86
- 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.
-
Persistence - restart IDE
| Setup: | Proceed steps from Move to other group testcase |
- Uncheck enabled property of breakpoint Line MemoryView.java:86
- Select node Line MemoryView.java:101 and invoke Customize action from its context menu
- Change its Condition property to true
- Put caret on line 62
- Invoke action Run | New Breakpoint from menu
- In New Breakpoint dialog set Breakpoint Type to Method and press OK
- Select variable timer on line 38 (doubleclick on the variable name or select variable name in editor)
- Invoke action Run | New Breakpoint from menu
- Ensure the Stop on is set to Variable Access and press OK
- Restart IDE
-
EXPECTED RESULT: All breakpoints will be same as before IDE restart
| Teardown: | Delete all breakpoints |
-
Breakpoint highlighting
- Toggle breakpoint on line 91 and 107
- Invoke Debug Main Project action
- 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 |
-
View columns
- Click small button right below view close button
- In ThreadsView - Change Visible Columns dialog check Enabled checkbox
- 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. |
-
View columns
- Click small button right below view close button
- In WatchesView - Change Visible Columns dialog check toString() checkbox
- Press OK
-
EXPECTED RESULT: Watches view will display four columns: Name, Type, Value, toString()
-
Add simple watch
- Invoke Run | New Watch ... menu
- Enter name of the watch taken
-
EXPECTED RESULT: Watches view will show node with name taken. Other columns of the view will be empty.
-
Add watch expression
- Invoke Run | New Watch ... menu
- 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.
-
Add object watch
- Invoke Run | New Watch ... menu
- Enter name of the watch bundle
-
EXPECTED RESULT: Watches view will show node with name bundle. Other columns of the view will be empty.
-
Watches functionality
- Put caret on line 101
- 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 |
-
Delete
| Setup: | Continue after Watches functionality testcase |
- Select watch node with name System.getProperty("java.version")
- Invoke Delete action from pop-up menu
-
EXPECTED RESULT: The watch node will be deleted.
-
Delete all
| Setup: | Continue after Delete testcase |
- Put caret on line 101
- Invoke Run to Cursor action
- Select watch node with name taken
- Invoke Create Fixed Watch action from its pop-up menu
- Select watch node with name bundle
- Invoke Delete All action from the pop-up menu of the Watches view
-
EXPECTED RESULT: All watches will be deleted.
| Teardown: | Finish debugger session |
-
Create fixed watch I
- Create watch free
- Toggle breakpoint on line 101
- Invoke Debug Main Project action
- Select watch node with name free
- Invoke Create Fixed Watch action from pop-up menu
- Invoke Debug | Continue action
-
EXPECTED RESULT: Debugger will hit the breakpoint again. Fixed watch will display same value, the normal watch will change value.
| Teardown: | Finish debugging session, delete breakpoint and watches |
-
Create fixed watch II
| Setup: | Proceed steps from Create fixed watch I testcase |
- Select fixed watch node with name free
- Invoke its context menu
-
EXPECTED RESULT: There will be no menu item Create Fixed Watch
| Teardown: | Finish debugging session, delete only watch |
-
Create fixed watch III
| Setup: | Continue after Create fixed watch II testcase |
- Invoke Debug Main Project action
- Invoke Window | Debugging | Local Variables action from main menu
- Select node taken in Local Variables view
- Invoke Create Fixed Watch from its context menu
- Invoke Debug | Continue action
-
EXPECTED RESULT: Watches view will contain node with name taken. The value of the node will be different to value of node taken displayed in Local Variables view.
| Teardown: | Finish debugging session, delete breakpoint and watch |
-
Properties
- Create watches total - free, total
- Put caret on line 101
- Invoke Run to Cursor action
- Select watch node with name total
- Invoke Properties action from its pop-up menu
- In Properties - total dialog set Watch Expression to taken and press OK
-
EXPECTED RESULT: Watch taken will show the same value as watch total - free
| Teardown: | Finish debugging session and delete watches |
-
Out of scope watch
- Put caret on line 101
- Create watch notInScope
- Invoke Run to Cursor action
-
EXPECTED RESULT: The watch value will be >"notInScope" is not a known variable in current context<
| Teardown: | Finish debugging session and delete watch |
-
Evaluation I
- Put caret on line 101
- Invoke Run to Cursor action
- Create watch System.out.println("Evaluated")
-
EXPECTED RESULT: There will be only one string Evaluated in the Output Window.
-
Evaluation II
|