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.
- Invoke dialog
- Open Run main menu
- 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.
- Start dialog again
- Start debugging the project - Run | Debug Main Project (CTRL+F5).
- Put caret on line 101
- Invoke Run to Cursor action
- Invoke dialog using menu Run -> Evaluate Expression ...
- 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.
- Evaluate expression I.
- Type string free into Expression textfield
- Start evaluation pressing Enter key
- EXPECTED RESULT: free is name of local variable. Result grid should contain one line with name, type and value
- Evaluate expression II.
- Type string @#$%#$^#$56%^&* into Expression textfield
- 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.
- Evaluate expression III.
- Type string r into Expression textfield
- Start evaluation pressing Evaluate button
- EXPECTED RESULT: r is a local variable name. Result grid should contain one line with name, type and value
- Evaluate previous expressions from list
- 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.
- Use Watch button
- Evaluate previous expressions from list and press Watch button for each expression.
- Close dialog and check the content of Watches window
- EXPECTED RESULT: Watches window will contain all evaluated expressions.
- Use Evaluate and Watch buttons with empty expression value
- Invoke Evaluate Expression dialog again and clear expression string
- EXPECTED RESULT: Evaluate and Watch should be disabled.
- Test Help
- Press Help button
- EXPECTED RESULT: This button should invoke ide help window with page Evaluate Expression Dialog Box.
- Close help doc window
- Click inside Expression input to set focus
- Press F1 key
- {{{1}}}
- Close dialog
- Invoke Evaluate Expression dialog
- Press Close button
- EXPECTED RESULT: This button should close the dialog.
- Invoke Evaluate Expression dialog again
- Press ESC key
- EXPECTED RESULT: This action should close the dialog.
- Evaluate other expressions ...
- Invoke Evaluate Expression dialog again
- Evaluate string new java.awt.Point(2,3).getX()
- EXPECTED RESULT:
- Evaluate string new java.awt.Point(2,3).x
- EXPECTED RESULT:
- Evaluate string java.lang.Object.class
- EXPECTED RESULT:
- Evaluate string System.out.println("BBB")
- EXPECTED RESULT:
- Expression Result customization
- Push most right button in Result table header.
- Check toString: Display value of toString call check box and push OK button.
- EXPECTED RESULT: There should be toString() column shown for Result table.
- Expression Result toString()
- Close the Evaluate Expression dialog and continue in debugging (F5).
- Invoke Evaluate Expression dialog.
- Enter "timer" for Expression and push Evaluate button.
- EXPECTED RESULT: .}}

