JPDA Debugger - Evaluate Expression Dialog Test Specification
Author: Jiri Vagner,
Filip Zamboj
Version: 0.2
Lastupdate: 2008/07/23
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 Debug main menu
- Find Evaluate Expression ... menu item
- EXPECTED RESULT: Inside Debug menu there should be a disabled Evaluate Expression ... menu item. Also shortcut CTRL + F9 doesn't work.
- Start dialog again
- Start debugging the project - Debug | Debug Project (CTRL+F5).
- Put caret on line 101
- Invoke Run to Cursor action
- Invoke dialog using menu Debug -> 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 Debug 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 | free | long | 4471936 |
- 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 | r | Runtime | #number | and you should be able to expand root node r -> Static -> currentRuntime -> Static -> currentRuntime -> ....
- 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
- EXPECTED RESULT: This button should invoke ide help window with page Evaluate Expression Dialog Box. (Issue 133749 )
- 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: | java.awt.Point(2,3).getX() | double | 2.0 |
- Evaluate string new java.awt.Point(2,3).x
- EXPECTED RESULT: | new java.awt.Point(2,3).x | int | 2 |
- Evaluate string java.lang.Object.class
- EXPECTED RESULT: | (+)java.lang.Object.class | Class | class java.lang.Object |
- Evaluate string System.out.println("BBB")
- EXPECTED RESULT: | System.out.println("BBB") | void | void |
- Expand menu from result row
- Evaluate string new java.awt.Point(2,3).x
- Invoke menu from the 1. result row in column Name by right mouse button
- EXPECTED RESULT: menu should expand
- Display As
- Decimal
- Hexadecimal
- Octal
- Binary
- Character
- Create Fixed Watch
- List Options
- Sort
- None
- Name
- Value
- toString()
- Type
- Ascending
- Descending
- Change Visible Columns
- RInvoke menu from the 1. result row not into column Name by right mouse button
- EXPECTED RESULT: menu should expand, List Options should contain more options depending on position
- Expression Result Sorting
- Should work for each column except toString()
- Invoke menu from the column name by right mouse button
- EXPECTED RESULT: The arrow showing ascending order should appear. The List Options -> Sort -> Descending | Ascending should be enabled
- Invoke menu from the the column name by right mouse button
- EXPECTED RESULT: The arrow showing descending order should appear. The List Options -> Sort -> Descending | Ascending should be enabled
- Invoke menu from the the column name by right mouse button
- EXPECTED RESULT: The arrow should disappear. The List Options -> Sort -> Descending | Ascending should be disabled
- Expression Result customization I
- 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 customization II
- Invoke menu from the whichever column in result row by right mouse button
- Choose -> Display As -> (Choose one of options)
- EXPECTED RESULT: The value and toString() column should convert depending on choosen numeric base
- 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: | (+) timer | Timer | #number | javax.swing.Timer@#number |.