TS 60 JPDAdbg EvaluateExpression

JPDA Debugger - Evaluate Expression Dialog Test Specification

Author: Jiri Vagner
Version: 0.1
Lastupdate: 2007/04/18
Introduction: This document describes test specification for testing of Evaluate Expression dialog while using JPDA debugger.
Comments: There is a used test project MemoryView in test cases.


Test suite: Evaluate Expression Dialog Test

Purpose:
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open file MemoryView.java in editor.

  1. Invoke dialog
    1. Open Run main menu
    2. Find Evaluate Expression ... menu item
    • EXPECTED RESULT: Inside Run menu there should be a disabled Evaluate Expression ... menu item. Also shortcut CTRL + F9 doesn't work.
  2. Start dialog again
    1. Start debugging the project - Run | Debug Main Project (CTRL+F5).
    2. Put caret on line 101
    3. Invoke Run to Cursor action
    4. Invoke dialog using menu Run -> Evaluate Expression ...
    5. Close dialog and try to invoke it again using keyboard shortcut CTRL + F9
    • EXPECTED RESULT: You are debugging application now, Evaluate Expression action inside Run menu should be enabled and we should be able to enter string to evaluate.
  3. Evaluate expression I.
    1. Type string free into Expression textfield
    2. Start evaluation pressing Enter key
    • EXPECTED RESULT: free is name of local variable. Result grid should contain one line with name, type and value
  4. Evaluate expression II.
    1. Type string @#$%#$^#$56%^&* into Expression textfield
    2. Start evaluation pressing Evaluate button
    • EXPECTED RESULT: @#$%#$^#$56%^&* is nonsense, evaluator will invoke alert with error msg. Close dialog, now Expression textfield will be focused.
  5. Evaluate expression III.
    1. Type string r into Expression textfield
    2. Start evaluation pressing Evaluate button
    • EXPECTED RESULT: r is a local variable name. Result grid should contain one line with name, type and value
  6. Evaluate previous expressions from list
    1. Expand Expression listbox and try to evaluate previous evaluated expression
    • EXPECTED RESULT: List will containst r and free items. After selecting the value, result grid should show right values.
  7. Use Watch button
    1. Evaluate previous expressions from list and press Watch button for each expression.
    2. Close dialog and check the content of Watches window
    • EXPECTED RESULT: Watches window will contain all evaluated expressions.
  8. Use Evaluate and Watch buttons with empty expression value
    1. Invoke Evaluate Expression dialog again and clear expression string
    • EXPECTED RESULT: Evaluate and Watch should be disabled.
  9. Test Help
    1. Press Help button
    • EXPECTED RESULT: This button should invoke ide help window with page Evaluate Expression Dialog Box.
    1. Close help doc window
    2. Click inside Expression input to set focus
    3. Press F1 key
    • {{{1}}}
  10. Close dialog
    1. Invoke Evaluate Expression dialog
    2. Press Close button
    • EXPECTED RESULT: This button should close the dialog.
    1. Invoke Evaluate Expression dialog again
    2. Press ESC key
    • EXPECTED RESULT: This action should close the dialog.
  11. Evaluate other expressions ...
    1. Invoke Evaluate Expression dialog again
    2. Evaluate string new java.awt.Point(2,3).getX()
    • EXPECTED RESULT:
    1. Evaluate string new java.awt.Point(2,3).x
    • EXPECTED RESULT:
    1. Evaluate string java.lang.Object.class
    • EXPECTED RESULT:
    1. Evaluate string System.out.println("BBB")
    • EXPECTED RESULT:
  12. Expression Result customization
    1. Push most right button in Result table header.
    2. Check toString: Display value of toString call check box and push OK button.
    • EXPECTED RESULT: There should be toString() column shown for Result table.
  13. Expression Result toString()
    1. Close the Evaluate Expression dialog and continue in debugging (F5).
    2. Invoke Evaluate Expression dialog.
    3. Enter "timer" for Expression and push Evaluate button.
    • EXPECTED RESULT: .}}


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