TS 68 JPDAdbg I

Revision as of 13:14, 27 November 2009 by Vsigler (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)

Debugger Test Specification for NetBeans 6.8 Part I - Interface

Author: Vojtech Sigler based on earlier versions by Filip Zamboj, Emanuel Hucka, Petr Cyhelsky
Version: 1.0
Lastupdate: 2009/27/11
Introduction: This document describes test specification for testing of debugger module in NetBeans ide. This specification tests java debugger ((debugger -> Java in bugzilla), which is implementation of most common Java debugger - JPDA, as well as the general debugger module (debugger -> Code in bugzilla) providing basic framework for implementations of all debuggers in IDE.
Comments: This test specification uses the following test projects: MemoryView and freeform.

Contents


Important!! Setup Before You Start Testing

Purpose: Set up your Netbeans before you start testing. Please set up your netbeans in this way before each test!

  1. Setup Debugger Sources (Since version 6.7 JDK sources are enabled by default. Uncheck them.)
    1. Invoke from main panel Window -> Debugger -> Sources
    2. uncheck <JAVA_HOME>/src.zip


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 I - after clean start
    1. Expand menu Window from the main menu
    • EXPECTED RESULT: In a clean full install with Ergonomics enabled, all clusters except for Base IDE are disabled by default. That means that most of debugger infrastructure is also disabled. The Window menu will not contain anything debugger-related.
  2. Debug menu I - after clean start
    1. Expand menu Debug from the main menu
    • EXPECTED RESULT: At this moment there will be only Attach Debugger menu item present in the menu.
  3. Attach debugger after clean start
    1. Expand menu Debug again and invoke Attach Debugger
    • EXPECTED RESULT: The Attach dialog will open. There will be a combobox with a list of various debuggers (java, gdb, ruby,..). The dialog will show a message that in order to use the debugger specified in the combobox, support for it needs to be activated first. An Activate button will be present. This message will be shown for every item of the combobox (try selecting each of the items).
  4. Window menu II
    1. Open MemoryView project and set it as main project
    2. Expand menu Window from the main menu
    • EXPECTED RESULT: Menu Window contains folowing submenu items:
      • Debugging (with submenu)
        • Variables
        • Watches
        • Call Stack
        • Loaded Classes
        • Breakpoints
        • Sessions
        • Threads
        • Sources
        • Debugging
  5. Debug menu II
    1. Now that MemoryView project is open, expand menu Debug from the main menu
    • EXPECTED RESULT: Menu Debug contains folowing disabled/enabled menu items regarding to debugger:
      • Debug Main Project (enabled)
      • Debug File (disabled)
      • Debug Test for File (disabled)
      • Attach Debugger... (enabled)
      • Finish Debugger Session (disabled)
      • Pause (disabled)
      • Continue (disabled)
      • Step Over (disabled)
      • Step Over Expression (disabled)
      • Step Into (enabled)
      • Step Into Next Method (disabled)
      • Step Out (disabled)
      • Run to Cursor (disabled)
      • Apply Code Changes (disabled)
      • Set Current Thread
      • Stack (with submenu) > (enabled)
        • Make Callee Current (disabled)
        • Make Caller Current (disabled)
        • Pop Topmost Call (disabled)
      • Toggle Line Breakpoint (disabled)
      • New Breakpoint (enabled)
      • New Watch (enabled)
      • Evaluate Expression (enabled)
      • Check for deadlock (disabled)
  6. 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 File
      • Attach Debugger...
      • Step Into
      • Run to Cursor
      • Stack
      • Toggle Line Breakpoint
      • New Breakpoint
      • New Watch
      • Evaluate Expression
  7. 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. Open MemoryView project and set it as main project.

  1. Build toolbar
    1. Open View | Toolbars and check Run menu item
    • EXPECTED RESULT: Make sure the toolbar contains Debug Project button (enabled/disabled regarding of opened projects)
  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
    • Teardown: Invoke View | Toolbars and unselect Debug menu item.
  3. Enabling actions
    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: Expression Evaluator View

Purpose: This test suite verifies Expression Evaluator view
Setup: Start NetBeans IDE with clear userdir.

  1. Expression Evaluator view
    • Setup: Open project MemoryView
    1. Open file MemoryView.java in editor
    2. Invoke Debug and pick Evaluate Expression
    • EXPECTED RESULT: Make sure that Expression Evaluator appeared between Editor and bottom Task panel.


Test suite: Debugger views

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

  1. Variables
    1. Invoke Window | Debugging | Variables
    • EXPECTED RESULT: 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. There are two tabs in sources tab, Selected Project and Remote Attach
  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 two red squares with a green arrow will be shown on the left side of the line.
    • 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 Packages Folder - Packages (specified by brown picture in shape of cube)
    • Teardown: Close the project



Test suite: Java Debugger General Options

Purpose: Verifies if general options are present
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open file MemoryView.java in editor.

  1. Java Debugger Options
    1. Invoke Tools -> Options -> Miscellaneous Tab -> Java Debugger Tab
    • EXPECTED RESULT: You see 3 categories for various settings of Java Debugger. These categories are: General, Step Filters, Variable Formatters
    • 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