TS 80 JPDAdbg Interface

JPDA Debugger Interface Test Specification for NetBeans 8.0

Author: Jiří Kovalský
Version: 1.1
Last update: 11/06/2013
Introduction: This document describes test specification for testing of debuggerjpda module in the NetBeans IDE which adds support for the most common Java debugger - JPDA. The tests also cover debuggercore module providing basic framework for implementations of all other debuggers in the NetBeans IDE.
Comments: This test specification needs MemoryView project.

Contents


Test suite: Setup NetBeans

Purpose: This test suite activates Java SE functionality in the NetBeans IDE.
Setup: Launch NetBeans IDE with an empty userdir.

  1. Activate Java SE functionality
    1. Invoke Tools > Plugins from main menu.
    2. Switch to Installed tab.
    3. Select Java SE functionality and push Activate button.
    4. Once the activation is finished push Finish button and then Close the Plugins dialog.
    • EXPECTED RESULT: All Java SE features were enabled. There are now menus like Run or Debug in the main menu.

Test suite: Menu items

Purpose: This test suite verifies if all menu items are presented on correct places.
Setup: Perform Setup NetBeans test suite.

  1. Window menu
    1. Expand Window menu from the main menu.
    • EXPECTED RESULT: Menu Window contains submenu Debugging with the following items: Variables, Watches, Call Stack, Loaded Classes, Breakpoints, Sessions, Threads, Sources, Debugging and Analyze Stack.
  2. Generic Debug menu
    1. Expand Debug menu from the main menu.
    • EXPECTED RESULT: Menu Debug contains the following disabled/enabled menu items: Debug Project (disabled), Debug File (disabled), Debug Test File (disabled), Attach Debugger..., Finish Debugger Session (disabled), Pause (disabled), Continue (disabled), Step Over (disabled), Step Over Expression (disabled), Step Into (disabled), Step Into Next Method (disabled), Step Out (disabled), Run to Cursor (disabled), Apply Code Changes (disabled), Take GUI Snapshot (disabled), Set Current Thread... (disabled), Stack (with submenu items Make Callee Current (disabled), Make Caller Current (disabled) and Pop Topmost Call (disabled)), Toggle Line Breakpoint (disabled), New Breakpoint..., New Watch..., Evaluate Expression... (disabled) and Check for Deadlock (disabled).
  3. Project specific Debug menu
    1. Open MemoryView project.
    2. Expand Debug menu from the main menu.
    • EXPECTED RESULT: Menu Debug contains the following enabled menu items: Debug Project (MemoryView), Attach Debugger..., Step Into, Stack, New Breakpoint... and New Watch....
  4. File specific Debug menu
    1. Open MemoryView.java file in Editor
    2. Expand Debug menu from the main menu
    • EXPECTED RESULT: Menu Debug contains the following enabled menu items: Debug Project (MemoryView), Debug File, Attach Debugger..., Step Into, Run to Cursor, Stack, Toggle Line Breakpoint, New Breakpoint... and New Watch....
  5. View menu
    1. Expand View > Toolbars menu from the main menu.
    • EXPECTED RESULT: Debug menu item must be presented in Toolbars menu.

Test suite: Toolbar buttons

Purpose: Test suite verifies content of Debug and Run toolbars.
Setup: Perform Setup NetBeans test suite.

  1. Run toolbar
    1. Invoke View > Toolbars from main menu and check Run menu item.
    • EXPECTED RESULT: Make sure the toolbar contains Debug Project button (enabled/disabled regarding of opened projects).
  2. Debug toolbar
    1. Invoke View > Toolbars and check Debug menu item
    • EXPECTED RESULT: Make sure that following toolbar buttons are visible (use tooltip on each button) in Debugger toolbar: Finish Debugger Session, Pause, Continue, Step Over, Step Over Expression, Step Into, Step Out, Run to Cursor, Apply Code Changes and Take GUI Snapshot.
  3. Project specific actions
    1. Open MemoryView project.
    • EXPECTED RESULT: Make sure that following toolbar buttons are enabled in Build toolbar: Debug Project. Make sure that following toolbar buttons are enabled in Debugger toolbar: Step Into
  4. File specific actions
    1. Open Source Packages > examples.advanced > MemoryView.java in Editor.
    • EXPECTED RESULT: Make sure that Step Into and Run to Cursor toolbar buttons are enabled in Debug toolbar.

Test suite: Editor actions

Purpose: This test suite verifies that Editor popup menu contains Debugging actions.
Setup: Perform Setup NetBeans test suite.

  1. Editor popup menu
    1. Open MemoryView project.
    2. Open Source Packages > examples.advanced > MemoryView.java in Editor.
    3. Invoke popup menu in editor area.
    • EXPECTED RESULT: Make sure that following menu items are presented: Debug File, Run Into Method, New Watch... and Toggle Line Breakpoint.

Test suite: Expression Evaluator view

Purpose: This test suite verifies availability of Expression Evaluator view.
Setup: Perform Setup NetBeans test suite.

  1. Expression Evaluator view
    1. Open MemoryView project.
    2. Open Source Packages > examples.advanced > MemoryView.java in Editor.
    3. Press F7 to start debugging session.
    4. Invoke Debug > Evaluate Expression from main menu.
    • EXPECTED RESULT: Make sure that Expression Evaluator component opened between Editor and bottom Task panel.

Test suite: Debugging views

Purpose: This test suite verifies existence and persistence of Debugging views.
Setup: Perform Setup NetBeans test suite.

  1. Variables view
    1. Invoke Window > Debugging > Variables from main menu.
    • EXPECTED RESULT: Variables view opened below the Editor.
  2. Watches view
    1. Invoke Window > Debugging > Watches from main menu.
    • EXPECTED RESULT: Watches view opened below the Editor.
  3. Call Stack view
    1. Invoke Window > Debugging > Call Stack from main menu.
    • EXPECTED RESULT: Call Stack view opened below the Editor.
  4. Loaded Classes view
    1. Invoke Window > Debugging > Loaded Classes from main menu.
    • EXPECTED RESULT: Loaded Classes view opened below the Editor.
  5. Breakpoints view
    1. Invoke Window > Debugging > Breakpoints from main menu.
    • EXPECTED RESULT: Breakpoints view opened below the Editor.
  6. Sessions view
    1. Invoke Window > Debugging > Sessions from main menu.
    • EXPECTED RESULT: Sessions view opened below the Editor.
  7. Threads view
    1. Invoke Window > Debugging > Threads from main menu.
    • EXPECTED RESULT: Threads view opened below the Editor.
  8. Sources view
    1. Invoke Window > Debugging > Sources from main menu.
    • EXPECTED RESULT: Sources view opened below the Editor with two sub-tabs: Selected Project and Remote Attach.
  9. Persistence of views between Debugging sessions
    1. Open MemoryView project.
    2. Press F7 to start debugging session.
    3. Open some additional debugger views from Window > Debugging menu and arrange some views freely i.e. move Variables view to Navigator component etc.
    4. Press Shift + F5 to finish debugging session.
    5. Press F7 to start debugging session again.
    • EXPECTED RESULT: Make sure that all views were opened and that your customizations from the previous session were preserved.
  10. Persistence of views between IDE sessions
    1. Invoke File > Exit from main menu and confirm your decision by pushing Exit IDE button.
    2. Start the IDE again.
    3. Press Ctrl + F5 to start debugging your MemoryView project.
    • EXPECTED RESULT: Make sure that all views were opened and that your customizations from the previous session were preserved.

Test suite: Editor annotations

Purpose: This test suite verifies interaction between Debugger and Editor annotations.
Setup: Perform Setup NetBeans test suite. Open MemoryView project. Open Source Packages > examples.advanced > MemoryView.java in Editor. Invoke Window > Debugging > Breakpoints from main menu.

  1. Line breakpoint
    1. Put cursor at line 58 (updateStatus(); method call) and press Ctrl + F8 to toggle line breakpoint there.
    • EXPECTED RESULT: The whole line 58 will be highlighted with a red color and red square will replace "58" line number identifier in the Editor gutter. Its tooltip will be Line Breakpoint.
  2. Field breakpoint
    1. Click "35" line number identifier in the Editor gutter to toggle field breakpoint there (private Timer timer; field definition).
    • EXPECTED RESULT: Red triangle will replace "35" line number identifier in the Editor gutter. Its tooltip will be Field Breakpoint.
  3. Method breakpoint
    1. Click "85" line number identifier in the Editor gutter to toggle method breakpoint there (private void updateStatus() { method start).
    • EXPECTED RESULT: Red triangle will replace "85" line number identifier in the Editor gutter. Its tooltip will be Method Breakpoint.
  4. Multiple breakpoints
    1. Toggle line breakpoints at lines 98 and 99.
    2. In Breakpoints view right click Line MemoryView.java:99 breakpoint and invoke Properties.
    3. Change Line Number to 98 and press OK in the Breakpoint Properties dialog.
    • EXPECTED RESULT: The whole line 98 will be highlighted with a red color and red square will replace "98" line number identifier in the Editor gutter. Its tooltip will be Multiple Breakpoints.
  5. Conditional breakpoint
    1. Toggle line breakpoint at line 45 (initComponents(); method call)
    2. In Breakpoints view right click Line MemoryView.java:45 breakpoint and invoke Properties.
    3. Check Condition checkbox, type i<5 as condition and push OK button.
    • EXPECTED RESULT: The whole line 45 will be highlighted with a red color and red L-shaped icon will replace "45" line number identifier in the Editor gutter. Its tooltip will be Conditional Breakpoint Hits when: i<5.
  6. Disabled breakpoint
    1. In Breakpoints view right click Line MemoryView.java:58 breakpoint and invoke Disable.
    • EXPECTED RESULT: The line will be highlighted with a gray color and its corresponding icon in the Editor gutter will also turn grey. Its tooltip will be Disabled Line Breakpoint.
  7. Enabled breakpoint
    1. Right click the grey square representing disabled line 58 breakpoint and invoke Disabled Breakpoint > Enabled from its popup menu.
    • EXPECTED RESULT: The line 58 breakpoint will get enabled. Both its icon in the Editor gutter and line 58 will turn red and its tooltip will be Line Breakpoint again.
  8. Disabled conditional breakpoint
    1. In Breakpoints view right click Line MemoryView.java:45 breakpoint and invoke Disable.
    • EXPECTED RESULT: The whole line 45 will be highlighted with a grey color and corresponding L-shaped icon in the Editor gutter will turn grey too. The tooltip will be Disabled Conditional Breakpoint Hits when: i<5.
  9. Current program counter
    1. Invoke Debug > Step Into from main menu.
    • EXPECTED RESULT: Line 236 will be highlighted with a green color and green arrow will replace "236" line number identifier in the Editor gutter.
  10. Program counter and breakpoint
    1. In Breakpoints view right click any breakpoint and invoke Disable All.
    2. In Breakpoints view right click Line MemoryView.java:58 breakpoint and invoke Enable.
    3. Invoke Debug > Continue from main menu.
    • EXPECTED RESULT: Debugger will stop at line 58. Line 58 will be highlighted with a green color and red square with green arrow will replace "58" line number identifier in the Editor gutter.
  11. Program counter and multiple breakpoints
    1. In Breakpoints view multi-select both Line MemoryView.java:98 breakpoints, right click them and invoke Enable.
    2. Invoke Debug > Continue from main menu.
    • EXPECTED RESULT: Debugger will stop at line 98. Line 98 will be highlighted green and two red squares with a green arrow will replace "98" line number identifier in the Editor gutter.
  12. Call site
    1. In Breakpoints view right click any breakpoint and invoke Delete All.
    2. Toggle line breakpoint at line 99 (status.setValue(taken); method call).
    3. Press Ctrl + F5 to start debugging session.
    • EXPECTED RESULT: Debugger will stop at line 101. Line 58 and 236 will be highlighted with a lilac color and lilac triangles will replace "58" and "236" line number identifiers in the Editor gutter. Their tooltips will be Call Stack Line.

Test suite: Java Debugger General Options

Purpose: This test suite verifies that general Debugger options are present.

  1. Java Debugger Options
    1. Invoke Tools > Options from main menu.
    2. Select Java category and then Java Debugger tab.
    • EXPECTED RESULT: There are 4 categories for various settings of Java Debugger. These categories are: General, Step Filters, Variable Formatters and Visual Debugging.
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo