TS 65 JPDAdbg I

Debugger Test Specification for NetBeans 6.5 Part I - Interface

Author: Emanuel Hucka, NB6.5 revision by Petr Cyhelsky, NB6.5 revision by Filip Zamboj
Version: 1.5
Lastupdate: 2008/07/23
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.

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

  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
    • *Debugging
  1. Debug menu I
    1. Expand menu Debug from the main menu
    • EXPECTED RESULT: Menu Debug contains folowing menu items regarding to debugger:
    • Debug Main Project
    • 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
    • Step Into Next 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
    • Check for deadlocks
  1. Debug menu II
    1. Open MemoryView project
    2. Expand menu Debug from the main menu
    • EXPECTED RESULT: Menu Debug contains folowing enabled menu items:
    • Debug Project
    • Attach Debugger...
    • Step Into
    • New Breakpoint
    • New Watch
  1. Debug menu III
    1. Open MemoryView.java file
    2. Expand menu Debug from the main menu
    • EXPECTED RESULT: Menu Debug contains folowing enabled menu items:
    • Debug Project
    • Debug "MemoryView.java"
    • Attach Debugger...
    • Step Into
    • Run to Cursor
    • Toggle Line Breakpoint
    • New Breakpoint
    • New Watch
  1. 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 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
  1. Enabling actions I
    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
  2. 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: 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 Properties
    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 Properties
    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 breakpoint ikon in gutter in editor area and enable breakpoint 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 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 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 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: Projects View

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.

  1. Tree Projects View
    1. Invoke Projects popup menu
    2. Select View Java Packages as
    3. Select Tree
    • EXPECTED RESULT: Packages should switch to tree view. You should see 'folder' hierarchy that finishes at .java files.
  2. List Projects View
    1. Invoke Projects popup menu
    2. Select View Java Packages as
    3. Select List
    • EXPECTED RESULT: Packages should switch to list view. You should see the Project Name - Source Pakacges Folder - Packages (specified by brown picture in shape of cube)
    • Teardown: Close the project


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