TS 68 Debugger Sanity

(Difference between revisions)
m (Removed one useless test step.)
 
(45 intermediate revisions not shown)
Line 1: Line 1:
==Debugger '''Sanity''' Test Specification for NetBeans 6.8 ==
==Debugger '''Sanity''' Test Specification for NetBeans 6.8 ==
-
'''Author:''' [mailto:vojtech.sigler@sun.com Vojtech Sigler] based on previous version by [mailto:filip.zamboj@sun.com Filip Zamboj]<br>
+
'''Authors:''' [mailto:jiri.kovalsky@oracle.com Jiri Kovalsky], [mailto:vojta@sigler.cz Vojtech Sigler] and [mailto:bfelipee@gmail.com Filip Zamboj]<br>
-
'''Version:''' 1.0 <br>'''Last update:''' 2009/25/11 <br>
+
'''Version:''' 1.1 <br>'''Last update:''' 2011/02/28 <br>
'''Introduction:''' Testcases for sanity testing all subcomponents of debugger  module in NetBeans ide. (In Bugzilla: ''debugger''->Java, Code, Ant)<br>
'''Introduction:''' Testcases for sanity testing all subcomponents of debugger  module in NetBeans ide. (In Bugzilla: ''debugger''->Java, Code, Ant)<br>
-
'''Comments:'''    There are used test projects [http://qa.netbeans.org/modules/debugger/promo-h/MemoryView.zip MemoryView] and [http://qa.netbeans.org/modules/debugger/promo-h/freeform.zip freeform] and [http://qa.netbeans.org/modules/debugger/promo-h/JSPExamples.zip JSPExamples] in test cases. <br>
+
'''Comments:'''    There are used test projects [http://wiki.netbeans.org/wiki/images/0/03/MemoryView.zip MemoryView] and [http://wiki.netbeans.org/wiki/images/7/7c/Freeform.zip FreeForm] and [http://wiki.netbeans.org/wiki/images/c/c6/JSPExamples.zip JSPExamples] in test cases. <br>
__TOC__
__TOC__
====Important!! Setup Before You Start Testing====
====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!  
+
Purpose: Set up your NetBeans before you start testing. Please set up your netbeans in this way before each test!  
-
# {{testcase|Setup Debugger Sources (Since version 6.7 JDK sources are enabled by default. Uncheck them) }}
+
# {{testcase|Setup Debugger Sources}}
##Perform this setting on each test suite if instructions in test suite are not stating anything else
##Perform this setting on each test suite if instructions in test suite are not stating anything else
##Open your testing project according to test suite
##Open your testing project according to test suite
-
##Invoke from main panel Window -> Debugger -> Sources  
+
##Invoke from main panel '''Window > Debugger > Sources'''
##uncheck <JAVA_HOME>/src.zip  
##uncheck <JAVA_HOME>/src.zip  
   
   
-
<br>
 
-
 
-
====Test suite: Projects View ====
 
-
Purpose:  Verifies annotations - debugger and source editor interaction <br>
 
-
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. Open file ''MemoryView.java'' in editor. <br>
 
-
 
-
# {{testcase|Tree Projects View }}
 
-
##Invoke Projects popup menu
 
-
##Select View Java Packages as
 
-
##Select Tree
 
-
#* {{result|EXPECTED RESULT: Packages should switch to tree view. You should see 'folder' hierarchy that finishes at .java files.}}
 
-
# {{testcase|List Projects View }}
 
-
##Invoke Projects popup menu
 
-
##Select View Java Packages as
 
-
##Select List
 
-
#* {{result|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
 
<br>
<br>
Line 38: Line 21:
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. Open file ''MemoryView.java'' in editor. <br>
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. Open file ''MemoryView.java'' in editor. <br>
# {{testcase|Java Debugger Options}}
# {{testcase|Java Debugger Options}}
-
##Invoke Tools -> Options -> Miscellaneous Tab -> Java Debugger Tab
+
##Invoke '''Tools > Options > Miscellaneous button > Java Debugger tab'''
#* {{result|EXPECTED RESULT: You see 3 categories for various settings of Java Debugger. These categories are: '''General''', '''Step Filters''', '''Variable Formatters'''}}
#* {{result|EXPECTED RESULT: You see 3 categories for various settings of Java Debugger. These categories are: '''General''', '''Step Filters''', '''Variable Formatters'''}}
#* Teardown: Close the project
#* Teardown: Close the project
Line 47: Line 30:
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. Open file ''MemoryView.java'' in editor. <br>
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. Open file ''MemoryView.java'' in editor. <br>
# {{testcase|Expression Evaluator view}}
# {{testcase|Expression Evaluator view}}
-
#* Setup:    Open project MemoryView
+
## Open file MemoryView.java in editor
-
##Open file MemoryView.java in editor
+
## Toggle line breakpoint at line 45.
-
##Invoke '''Debug Project'''  
+
## Push from main menu '''Debug > Debug Main Project'''
-
##Invoke '''Debug''' and pick  '''Evaluate Expression'''   
+
## Push from main menu '''Debug > Evaluate Expression...'''   
#* {{result|EXPECTED RESULT: Make sure that Expression Evaluator appeared between '''Editor''' and bottom '''Task''' panel. There must be a '''History''' button (triangle or arrow pointing down) and '''Evaluate Code Fragment''' button (a green arrow-like shape) }}
#* {{result|EXPECTED RESULT: Make sure that Expression Evaluator appeared between '''Editor''' and bottom '''Task''' panel. There must be a '''History''' button (triangle or arrow pointing down) and '''Evaluate Code Fragment''' button (a green arrow-like shape) }}
#* Teardown: Close the project
#* Teardown: Close the project
Line 57: Line 40:
====Test suite: Evaluate expression====
====Test suite: Evaluate expression====
Purpose:  Verify functionality of the evaluator window <br>
Purpose:  Verify functionality of the evaluator window <br>
-
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. Open file ''MemoryView.java'' in editor. Toggle line breakpoint on line 106 (text: text.invalidate();) and invoke Debug project action. '''Make sure that the violet diamond is pressed in Variables view!''' <br>
+
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. Open file ''MemoryView.java'' in editor. Toggle line breakpoint at line 106 (text: text.invalidate();) and invoke Debug project action. '''Make sure that the violet diamond is pressed in Variables view!''' <br>
# {{testcase|Primitive types }}
# {{testcase|Primitive types }}
-
##Invoke '''Debug | Evaluate Expression''' action
+
##Invoke '''Debug > Evaluate Expression''' action
##To expression field write <tt> {(int)(total-free);} </tt>
##To expression field write <tt> {(int)(total-free);} </tt>
##Press '''Evaluate''' button
##Press '''Evaluate''' button
#* {{result|EXPECTED RESULT: The expression <tt> {(int)(total-free);} </tt> is not valid. Dialog with text '''"Malformed Expression: "(ERROR)""''' and a button '''OK''' should appear. }}
#* {{result|EXPECTED RESULT: The expression <tt> {(int)(total-free);} </tt> is not valid. Dialog with text '''"Malformed Expression: "(ERROR)""''' and a button '''OK''' should appear. }}
# {{testcase|Variables }}
# {{testcase|Variables }}
-
##Invoke '''Debug | Evaluate Expression''' action  
+
##Invoke '''Debug > Evaluate Expression''' action  
##To expression field write '''return text.getText();'''  
##To expression field write '''return text.getText();'''  
##Press '''Evaluate''' button
##Press '''Evaluate''' button
Line 78: Line 61:
====Test suite: View filters====
====Test suite: View filters====
Purpose:  Verifies functionality of filters in Variables and Watches view <br>
Purpose:  Verifies functionality of filters in Variables and Watches view <br>
-
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. Open file ''LineBreakpoints.java'' in editor. Toggle line breakpoint on line 200. Invoke '''Debug File''' action from context menu of the file in Projects explorer. Open Watches view. <br>
+
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. Open file ''LineBreakpoints.java'' in editor. Toggle line breakpoint at line 200. Invoke '''Debug File''' action from context menu of the file in Projects explorer. Open Watches view. <br>
# {{testcase|Primitive filter }}
# {{testcase|Primitive filter }}
##Create watch ''n''
##Create watch ''n''
Line 92: Line 75:
##Create new watch ''string'' ''(note: You should have two watches active in your watches view, n of type int and string of type String)''  
##Create new watch ''string'' ''(note: You should have two watches active in your watches view, n of type int and string of type String)''  
##Select the watch you created in previous testcase and invoke '''Show only rows where ...''' action on column '''value''' of watch ''n''  
##Select the watch you created in previous testcase and invoke '''Show only rows where ...''' action on column '''value''' of watch ''n''  
-
#* {{result|EXPECTED RESULT: You should have several possibilites to filter watches:
+
#* {{result|EXPECTED RESULT: You should have several possibilities to filter watches:
#** Type <nowiki>==</nowiki> 50 with a result shows only ''n'' watch
#** Type <nowiki>==</nowiki> 50 with a result shows only ''n'' watch
#** Type &lt;&gt; 50 with a result shows only ''string'' watch
#** Type &lt;&gt; 50 with a result shows only ''string'' watch
-
#** Type &gt; 50 with a result shows no watch ''(note: to remove the filter invoke popup menu somewhere in the value column and select '''Show only rows where''' -&gt; '''No Filter''')''
+
#** Type &gt; 50 with a result shows no watch ''(note: to remove the filter invoke popup menu somewhere in the value column and select'' '''Show only rows where > No Filter''' '')''
#** Type &lt; 50 with a result shows only ''string'' watch
#** Type &lt; 50 with a result shows only ''string'' watch
#** Type <nowiki>&gt;=</nowiki> 50 with a result shows only ''n'' watch
#** Type <nowiki>&gt;=</nowiki> 50 with a result shows only ''n'' watch
Line 104: Line 87:
====Test suite: Basic functionality====
====Test suite: Basic functionality====
-
Purpose:  Verification of basic debugger funcionality: start, stop, stop on breakpoint, etc <br>
+
Purpose:  Verification of basic debugger functionality: start, stop, stop on breakpoint, etc. <br>
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. <br>
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. <br>
# {{testcase|Breakpoint functionality }}
# {{testcase|Breakpoint functionality }}
##Open file ''MemoryView.java'' in editor
##Open file ''MemoryView.java'' in editor
-
##Place your caret on line 101
+
##Place your caret at line 101
##Invoke '''Toggle Line Breakpoint''' action from editor's popup menu
##Invoke '''Toggle Line Breakpoint''' action from editor's popup menu
##Invoke '''Debug Project''' action from menu or toolbar
##Invoke '''Debug Project''' action from menu or toolbar
-
#* {{result|EXPECTED RESULT: Debugger will be started and after a while it will stop on line 101}}
+
#* {{result|EXPECTED RESULT: Debugger will be started and after a while it will stop at line 101}}
#* Teardown: Remove the breakpoint
#* Teardown: Remove the breakpoint
# {{testcase|Run to cursor }}
# {{testcase|Run to cursor }}
-
#* Setup:    Proceed steps from Breakpoint functionality tescase
+
#* Setup:    Proceed steps from Breakpoint functionality testcase
-
##Press F5 - an application window should appear a debugger should shop again at breakpoint on line 101
+
##Press '''F5''' - an application window should appear a debugger should stop again at breakpoint at line 101
-
##Place your caret on line 96
+
##Place your caret at line 96
##Invoke '''Run to Cursor''' action from menu or toolbar
##Invoke '''Run to Cursor''' action from menu or toolbar
-
#* {{result|EXPECTED RESULT: Debugger will run for a while and stop on line 96.}}
+
#* {{result|EXPECTED RESULT: Debugger will run for a while and stop at line 96.}}
#* Teardown: Finish debugging session
#* Teardown: Finish debugging session
# {{testcase|Run to cursor - start debugging }}
# {{testcase|Run to cursor - start debugging }}
##Open file ''MemoryView.java'' in editor
##Open file ''MemoryView.java'' in editor
-
##Place your caret on line 101
+
##Place your caret at line 101
##Invoke '''Run to Cursor''' action from menu or toolbar
##Invoke '''Run to Cursor''' action from menu or toolbar
-
#* {{result|EXPECTED RESULT: Debugger will start and run for a while and stop on line 101.}}
+
#* {{result|EXPECTED RESULT: Debugger will start and run for a while and stop at line 101.}}
#* Teardown: Finish debugging session
#* Teardown: Finish debugging session
# {{testcase|Step Into - start debugging }}
# {{testcase|Step Into - start debugging }}
Line 132: Line 115:
# {{testcase|Step Into }}
# {{testcase|Step Into }}
##Open file ''MemoryView.java'' in editor
##Open file ''MemoryView.java'' in editor
-
##Place your caret on line 58
+
##Place your caret at line 58
##Invoke '''Toggle Line Breakpoint''' breakpoint from editor's popup menu
##Invoke '''Toggle Line Breakpoint''' breakpoint from editor's popup menu
##Invoke '''Debug Project''' action from menu or toolbar
##Invoke '''Debug Project''' action from menu or toolbar
-
##Wait till debugger stops on line 58
+
##Wait till debugger stops at line 58
##Invoke '''Step Into''' action
##Invoke '''Step Into''' action
-
#* {{result|EXPECTED RESULT: Debugger will stop on line 86.}}
+
#* {{result|EXPECTED RESULT: Debugger will stop at line 86.}}
#* Teardown: Finish debugging session
#* Teardown: Finish debugging session
# {{testcase|Step Over }}
# {{testcase|Step Over }}
##Invoke '''Debug Project''' action from menu or toolbar
##Invoke '''Debug Project''' action from menu or toolbar
-
##Wait till debugger stops on line 58
+
##Wait till debugger stops at line 58
##Invoke '''Step Over''' action
##Invoke '''Step Over''' action
-
#* {{result|EXPECTED RESULT: Debugger will stop on line 60.}}
+
#* {{result|EXPECTED RESULT: Debugger will stop at line 60.}}
#* Teardown: Finish debugging session and delete all breakpoints
#* Teardown: Finish debugging session and delete all breakpoints
# {{testcase|Step Over Expression }}
# {{testcase|Step Over Expression }}
-
##Toggle line breakpoint on line 101
+
##Toggle line breakpoint at line 101
##Invoke '''Debug Project''' action from menu or toolbar
##Invoke '''Debug Project''' action from menu or toolbar
-
##Wait till debugger stops on line 101
+
##Wait till debugger stops at line 101
##Invoke '''Step Over Expression''' action five times
##Invoke '''Step Over Expression''' action five times
#* {{result|EXPECTED RESULT: Debugger will step on all methods of the expression}}
#* {{result|EXPECTED RESULT: Debugger will step on all methods of the expression}}
#* Teardown: Finish debugging session and delete all breakpoints
#* Teardown: Finish debugging session and delete all breakpoints
# {{testcase|Step Out }}
# {{testcase|Step Out }}
-
##Toggle line breakpoint on line 58
+
##Toggle line breakpoint at line 58
##Invoke '''Debug Project''' action from menu or toolbar
##Invoke '''Debug Project''' action from menu or toolbar
-
##Wait till debugger stops on line 58
+
##Wait till debugger stops at line 58
##Invoke '''Step Into''' action
##Invoke '''Step Into''' action
-
##Wait till debugger stops on line 86
+
##Wait till debugger stops at line 86
##Invoke '''Step Out''' action
##Invoke '''Step Out''' action
-
#* {{result|EXPECTED RESULT: Debugger will stop on line 60.}}
+
#* {{result|EXPECTED RESULT: Debugger will stop at line 60.}}
#* Teardown: Finish debugging session and remove breakpoint
#* Teardown: Finish debugging session and remove breakpoint
# {{testcase|Run Into Method }}
# {{testcase|Run Into Method }}
-
##Toggle line breakpoint on line 53
+
##Toggle line breakpoint at line 53
##Invoke '''Debug Project''' action from menu or toolbar
##Invoke '''Debug Project''' action from menu or toolbar
-
##Wait till debugger stops on line 53
+
##Wait till debugger stops at line 53
-
##Place your caret on line 62 between 17th and 29st character (text ''updateStatus'')
+
##Place your caret at line 62 between 17th and 29st character (text ''updateStatus'')
##Invoke '''Run Into Method''' action from editor popup menu
##Invoke '''Run Into Method''' action from editor popup menu
-
#* {{result|EXPECTED RESULT: The application will run for a second and after that debugger will stop on line 86.}}
+
#* {{result|EXPECTED RESULT: The application will run for a second and after that debugger will stop at line 86.}}
#* Teardown: Finish debugging session and remove breakpoint
#* Teardown: Finish debugging session and remove breakpoint
# {{testcase|Step Over Expression - Arguments }}
# {{testcase|Step Over Expression - Arguments }}
-
##Toggle line breakpoint on line 99
+
##Toggle line breakpoint at line 99
##Invoke '''Debug Project''' action
##Invoke '''Debug Project''' action
-
##Wait till debugger stops on line 99 and invoke '''Step Over''' action
+
##Wait till debugger stops at line 99 and invoke '''Step Over''' action
##Invoke '''Step Over Expression''' action
##Invoke '''Step Over Expression''' action
-
#* {{result|EXPECTED RESULT: Debugger will stop on line 102, constructor '''Long''' is selected by a green color. Variables view contains ''Before call to '&lt;init&gt;' '' with subnode ''Arguments'' which contains subnode ''total''. The icon next to ''Before call to '&lt;init&gt;' '' and ''Arguments'' nodes is a smaller version of the icon on '''Step Over Expression''' button in the Debug toolbar. }}
+
#* {{result|EXPECTED RESULT: Debugger will stop at line 102, constructor '''Long''' is selected by a green colour. Variables view contains ''Before call to '&lt;init&gt;' '' with subnode ''Arguments'' which contains subnode ''total''. The icon next to ''Before call to '&lt;init&gt;' '' and ''Arguments'' nodes is a smaller version of the icon on '''Step Over Expression''' button in the Debug toolbar. }}
# {{testcase|Step Over Expression - Return Values }}
# {{testcase|Step Over Expression - Return Values }}
#* Comments: Return value of constructor [http://www.netbeans.org/issues/show_bug.cgi?id=100198 issue 100198]
#* Comments: Return value of constructor [http://www.netbeans.org/issues/show_bug.cgi?id=100198 issue 100198]
##Invoke '''Step Over Expression''' action
##Invoke '''Step Over Expression''' action
-
#* {{result|EXPECTED RESULT: Debugger will stop on line 103, constructor '''Long''' is selected by a green color. Variables view contains ''Before call to '&lt;init&gt;' '' node with subnodes ''Arguments '' and ''Return values history''. ''Arguments'' node contains subnode ''free'' and node ''Return values history'' contains ''return &lt;init&gt;()'' subnode. The icon next to ''Before call to '&lt;init&gt;' '' and ''Arguments'' nodes is a smaller version of the icon on '''Step Over Expression''' button in the Debug toolbar. ''Return values history'' and its subnodes have an icon with a grey rectangle and a grey triangle. The Type column is empty and the Value column shows ''null''. The constructor from previous test case is underlined.}}
+
#* {{result|EXPECTED RESULT: Debugger will stop at line 103, constructor '''Long''' is selected by a green color. Variables view contains ''Before call to '&lt;init&gt;' '' node with subnodes ''Arguments '' and ''Return values history''. ''Arguments'' node contains subnode ''free'' and node ''Return values history'' contains ''return &lt;init&gt;()'' subnode. The icon next to ''Before call to '&lt;init&gt;' '' and ''Arguments'' nodes is a smaller version of the icon on '''Step Over Expression''' button in the Debug toolbar. ''Return values history'' and its subnodes have an icon with a grey rectangle and a grey triangle. The Type column is empty and the Value column shows ''null''. The constructor from previous test case is underlined.}}
# {{testcase|Step Over Expression - Arguments 2 }}
# {{testcase|Step Over Expression - Arguments 2 }}
##Invoke '''Step Over Expression''' action 2 times
##Invoke '''Step Over Expression''' action 2 times
-
#* {{result|EXPECTED RESULT: Debugger will stop on line 101, method '''format''' is selected by a green color. Variables view contains ''Before call to format'' node with subnodes ''Arguments'' and ''Return values history''. ''Arguments'' node contains a subnode ''new Object[[ | ]]{new Long(total),new Long(free),new Integer(taken)}'' containing 3 subnodes of all array items. The ''Return values history'' node contains 3 ''return &lt;init&gt;()'' subnodes. The icon next to ''Before call to 'format' '' and ''Arguments'' nodes is a smaller version of the icon on '''Step Over Expression''' button in the Debug toolbar. ''Return values history'' and its subnodes have an icon with a grey rectangle and a grey triangle. All constructors in the expression are underlined.}}
+
#* {{result|EXPECTED RESULT: Debugger will stop at line 101, method '''format''' is selected by a green colour. Variables view contains ''Before call to format'' node with subnodes ''Arguments'' and ''Return values history''. ''Arguments'' node contains a subnode ''new Object[[ | ]]{new Long(total),new Long(free),new Integer(taken)}'' containing 3 subnodes of all array items. The ''Return values history'' node contains 3 ''return &lt;init&gt;()'' subnodes. The icon next to ''Before call to 'format' '' and ''Arguments'' nodes is a smaller version of the icon on '''Step Over Expression''' button in the Debug toolbar. ''Return values history'' and its subnodes have an icon with a grey rectangle and a grey triangle. All constructors in the expression are underlined.}}
# {{testcase|Step Over Expression - Return Values 2 }}
# {{testcase|Step Over Expression - Return Values 2 }}
##Invoke '''Step Over Expression''' action again
##Invoke '''Step Over Expression''' action again
-
#* {{result|EXPECTED RESULT: Debugger will stop on line 101, method '''setText''' is selected by a green color. Variables view contains ''Before call to setText()'' node with subnodes ''Arguments'' and ''Return values history''. ''Arguments'' node contains a node ''msgMemory.format(new Object[[ | ]]{new Long(total),new Long(free),new Integer(taken)})'' of String type. Node ''Return values history'' contains 3 ''return &lt;init&gt;()'' subnodes and String node ''return format()''. The icon next to ''Before call to 'setText()' '' and ''Arguments'' nodes is a smaller version of the icon on '''Step Over Expression''' button in the Debug toolbar. ''Return values history'' and its subnodes have an icon with a grey rectangle and a grey triangle. All constructors in the expression are underlined.}}
+
#* {{result|EXPECTED RESULT: Debugger will stop at line 101, method '''setText''' is selected by a green colour. Variables view contains ''Before call to setText()'' node with subnodes ''Arguments'' and ''Return values history''. ''Arguments'' node contains a node ''msgMemory.format(new Object[[ | ]]{new Long(total),new Long(free),new Integer(taken)})'' of String type. Node ''Return values history'' contains 3 ''return &lt;init&gt;()'' subnodes and String node ''return format()''. The icon next to ''Before call to 'setText()' '' and ''Arguments'' nodes is a smaller version of the icon on '''Step Over Expression''' button in the Debug toolbar. ''Return values history'' and its subnodes have an icon with a grey rectangle and a grey triangle. All constructors in the expression are underlined.}}
#* Teardown: Finish debugger session, delete all breakpoints
#* Teardown: Finish debugger session, delete all breakpoints
<br>
<br>
Line 192: Line 175:
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. Open file ''FixAndContinue.java'' in editor. <br>
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. Open file ''FixAndContinue.java'' in editor. <br>
# {{testcase|Change method I }}
# {{testcase|Change method I }}
-
##Toggle line breakpoint on line 25 of the file ''FixAndContinue.java''
+
##Toggle line breakpoint at line 25 of the file ''FixAndContinue.java''
##Invoke '''Debug File''' action form context menu of file in Projects view
##Invoke '''Debug File''' action form context menu of file in Projects view
##Invoke '''Step Over'''
##Invoke '''Step Over'''
-
##Change method call on line 30 to ''afterFix();''
+
##Change method call at line 30 to ''afterFix();''
##Invoke '''Apply Code Changes'''
##Invoke '''Apply Code Changes'''
##Invoke '''Step Over'''
##Invoke '''Step Over'''
#* {{result|EXPECTED RESULT: In output will be two messages: ''Before code changes'' followed by ''After code changes''}}
#* {{result|EXPECTED RESULT: In output will be two messages: ''Before code changes'' followed by ''After code changes''}}
-
#* Teardown: Finish debugging session Change method call on line 30 to ''beforeFix();'' Remove brekapoint from line 25
+
#* Teardown: Finish debugging session Change method call at line 30 to ''beforeFix();'' Remove breakpoint from line 25
<br>
<br>
Line 206: Line 189:
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. Open file ''MemoryView.java'' in editor Open Variables view. <br>
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. Open file ''MemoryView.java'' in editor Open Variables view. <br>
# {{testcase|Variables }}
# {{testcase|Variables }}
-
##Put caret on line 91
+
##Put caret at line 91
##Invoke '''Run To Cursor''' action
##Invoke '''Run To Cursor''' action
-
#* {{result|EXPECTED RESULT: Debugger will stop on line 91. Variables view will contain nodes ''this'', ''r'', ''free'', ''total''. Nodes ''this'' and ''r'' should be expandable.}}
+
#* {{result|EXPECTED RESULT: Debugger will stop at line 91. Variables view will contain nodes ''this'', ''r'', ''free'', ''total''. Nodes ''this'' and ''r'' should be expandable.}}
#* Teardown: Finish debugging session
#* Teardown: Finish debugging session
# {{testcase|Member variables }}
# {{testcase|Member variables }}
#* Setup:    Proceed steps from Variables testcase
#* Setup:    Proceed steps from Variables testcase
##Expand node ''this''
##Expand node ''this''
-
#* {{result|EXPECTED RESULT: Variables view will contain node ''timer'', ''Static'', ''Inehrited'' and other nodes under node ''this''. Ensure node ''this'' is not under node ''this'' again.}}
+
#* {{result|EXPECTED RESULT: Variables view will contain node ''timer'', ''Static'', ''Inherited'' and other nodes under node ''this''. Ensure node ''this'' is not under node ''this'' again.}}
#* Teardown: Finish debugging session
#* Teardown: Finish debugging session
# {{testcase|Static variables }}
# {{testcase|Static variables }}
Line 223: Line 206:
#* Setup:    Proceed steps from Member Variables testcase
#* Setup:    Proceed steps from Member Variables testcase
##Expand node ''Inherited''
##Expand node ''Inherited''
-
#* {{result|EXPECTED RESULT: Nodes of variables from javax.swing.JFrame will be under node ''Inherited''. Ensure node ''Inherited'' is not under node ''Inherited'' again.}}
+
#* {{result|EXPECTED RESULT: Nodes of variables from [http://download.oracle.com/javase/1.5.0/docs/api/javax/swing/JFrame.html javax.swing.JFrame] will be under node ''Inherited''. Ensure node ''Inherited'' is not under node ''Inherited'' again.}}
#* Teardown: Finish debugging session
#* Teardown: Finish debugging session
# {{testcase|Go to source }}
# {{testcase|Go to source }}
Line 229: Line 212:
##Close file ''MemoryView.java'' in editor
##Close file ''MemoryView.java'' in editor
##Select node ''jPanel1'' and invoke '''Go To Source''' from its context menu
##Select node ''jPanel1'' and invoke '''Go To Source''' from its context menu
-
#* {{result|EXPECTED RESULT: File ''MemoryView.java'' will be opened in editor. Caret will be on line 223.}}
+
#* {{result|EXPECTED RESULT: File ''MemoryView.java'' will be opened in editor. Caret will be at line 223.}}
#* Teardown: Finish debugging session
#* Teardown: Finish debugging session
# {{testcase|Create fixed watch }}
# {{testcase|Create fixed watch }}
Line 242: Line 225:
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. <br>
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. <br>
# {{testcase|Add line breakpoint }}
# {{testcase|Add line breakpoint }}
-
##Toggle line breakpoint on line 91
+
##Toggle line breakpoint at line 91
#* {{result|EXPECTED RESULT: Breakpoint with name ''Line MemoryView.java:91'' will be created. Icon of the breakpoint will be red square.}}
#* {{result|EXPECTED RESULT: Breakpoint with name ''Line MemoryView.java:91'' will be created. Icon of the breakpoint will be red square.}}
#* Teardown: Delete breakpoint
#* Teardown: Delete breakpoint
# {{testcase|Remove line breakpoint }}
# {{testcase|Remove line breakpoint }}
#* Setup:    Proceed steps from Add line breakpoint testcase
#* Setup:    Proceed steps from Add line breakpoint testcase
-
##Toggle line breakpoint on line 91
+
##Toggle line breakpoint at line 91
#* {{result|EXPECTED RESULT: Breakpoint will be removed from breakpoints view.}}
#* {{result|EXPECTED RESULT: Breakpoint will be removed from breakpoints view.}}
# {{testcase|Add method breakpoint }}
# {{testcase|Add method breakpoint }}
-
##Put caret on line 95
+
##Put caret at line 95
-
##Invoke action '''Debug | New Breakpoint''' from menu
+
##Invoke action '''Debug > New Breakpoint''' from menu
##In '''New Breakpoint''' dialog set Breakpoint Type to ''Method'' and press '''OK'''
##In '''New Breakpoint''' dialog set Breakpoint Type to ''Method'' and press '''OK'''
#* {{result|EXPECTED RESULT: Breakpoint with name ''Method MemoryView:updateStatus'' will be created. Icon of the breakpoint will be red triangle.}}
#* {{result|EXPECTED RESULT: Breakpoint with name ''Method MemoryView:updateStatus'' will be created. Icon of the breakpoint will be red triangle.}}
Line 260: Line 243:
#* Teardown: Delete breakpoint
#* Teardown: Delete breakpoint
# {{testcase|Disable breakpoint }}
# {{testcase|Disable breakpoint }}
-
##Toggle line breakpoint on line 91
+
##Toggle line breakpoint at line 91
##Uncheck enabled property of breakpoint ''Line MemoryView.java:91'' in Breakpoints view
##Uncheck enabled property of breakpoint ''Line MemoryView.java:91'' in Breakpoints view
##Invoke '''Debug Project''' action
##Invoke '''Debug Project''' action
Line 268: Line 251:
##Open MemoryView.java in source editor
##Open MemoryView.java in source editor
##Toggle several breakpoints in editor gutter
##Toggle several breakpoints in editor gutter
-
##Create several non-line breakpoints - Debug | New Breakpoint ...
+
##Create several non-line breakpoints - '''Debug > New Breakpoint''' ...
##Invoke '''Disable All''' action from the pop-up menu of the '''Breakpoints''' window pane
##Invoke '''Disable All''' action from the pop-up menu of the '''Breakpoints''' window pane
-
#* {{result|EXPECTED RESULT: All breakpoint must have ''Enabled'' property set to "False".}}
+
#* {{result|EXPECTED RESULT: All breakpoints must have ''Enabled'' property set to "False".}}
# {{testcase|Enable all breakpoints }}
# {{testcase|Enable all breakpoints }}
##Invoke '''Enable All''' action from the pop-up menu of the ''Breakpoints'' window pane
##Invoke '''Enable All''' action from the pop-up menu of the ''Breakpoints'' window pane
-
#* {{result|EXPECTED RESULT: All breakpoint must have ''Enabled'' property set to "True".}}
+
#* {{result|EXPECTED RESULT: All breakpoints must have ''Enabled'' property set to "True".}}
# {{testcase|Remove all breakpoints }}
# {{testcase|Remove all breakpoints }}
##Select any breakpoint from Breakpoints view and invoke '''Delete All''' action from its context menu
##Select any breakpoint from Breakpoints view and invoke '''Delete All''' action from its context menu
#* {{result|EXPECTED RESULT: All breakpoints will be removed from breakpoints view.}}
#* {{result|EXPECTED RESULT: All breakpoints will be removed from breakpoints view.}}
# {{testcase|Breakpoint highlighting }}
# {{testcase|Breakpoint highlighting }}
-
##Toggle line breakpoint on line 91 and 107
+
##Toggle line breakpoint at line 91 and 107
##Invoke '''Debug Project''' action
##Invoke '''Debug Project''' action
-
##When debugger stops on line 91, invoke '''Continue''' action
+
##When debugger stops at line 91, invoke '''Continue''' action
#* {{result|EXPECTED RESULT: Breakpoint ''Line MemoryView.java:91'' is diplayed in plain text. Breakpoint ''Line MemoryView.java:107'' is displayed in bold text.}}
#* {{result|EXPECTED RESULT: Breakpoint ''Line MemoryView.java:91'' is diplayed in plain text. Breakpoint ''Line MemoryView.java:107'' is displayed in bold text.}}
#* Teardown: Finish debugging session and delete all breakpoints
#* Teardown: Finish debugging session and delete all breakpoints
Line 290: Line 273:
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. Open file ''MemoryView.java'' in editor. Open Watches view. <br>
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. Open file ''MemoryView.java'' in editor. Open Watches view. <br>
# {{testcase|Add simple watch }}
# {{testcase|Add simple watch }}
-
##Invoke '''Debug | New Watch ...''' menu
+
##Invoke '''Debug > New Watch ...''' menu
##Enter name of the watch ''taken''
##Enter name of the watch ''taken''
#* {{result|EXPECTED RESULT: Watches view will show node with name ''taken''. Other columns of the view will be empty.}}
#* {{result|EXPECTED RESULT: Watches view will show node with name ''taken''. Other columns of the view will be empty.}}
# {{testcase|Add watch expression I }}
# {{testcase|Add watch expression I }}
-
##Invoke '''Debug | New Watch ...''' menu
+
##Invoke '''Debug > New Watch ...''' menu
##Enter name of the watch ''System.getProperty("java.version")''
##Enter name of the watch ''System.getProperty("java.version")''
-
#* {{result|EXPECTED RESULT: Watches view will show node with name ''System.getProperty("java.version")''. Other columns of the view will be empty. Make sure code completition works!}}
+
#* {{result|EXPECTED RESULT: Watches view will show node with name ''System.getProperty("java.version")''. Other columns of the view will be empty. Make sure code completion works!}}
# {{testcase|Add watch expression II }}
# {{testcase|Add watch expression II }}
##Invoke '''New Watch''' from watches view context menu
##Invoke '''New Watch''' from watches view context menu
##Enter name of the watch ''System.getProperty("java.version")''
##Enter name of the watch ''System.getProperty("java.version")''
-
#* {{result|EXPECTED RESULT: Watches view will show node with name ''System.getProperty("java.version")''. Other columns of the view will be empty. Make sure code completition works and New Watch dialog is the same as in testcase Add Watch Expression I! }}
+
#* {{result|EXPECTED RESULT: Watches view will show node with name ''System.getProperty("java.version")''. Other columns of the view will be empty. Make sure code completion works and New Watch dialog is the same as in testcase Add Watch Expression I! }}
# {{testcase|Add watch expression III }}
# {{testcase|Add watch expression III }}
## Create a new watch ''System.getProperty("java.version")'' by typing into the ''Enter New Watch'' row in the Watches/Variables view and pressing enter
## Create a new watch ''System.getProperty("java.version")'' by typing into the ''Enter New Watch'' row in the Watches/Variables view and pressing enter
-
#* {{result|EXPECTED RESULT: Watches view will show node with name ''System.getProperty("java.version")''. Other columns of the view will be empty. As of now the this method does not have code completion (bug #168970). }}
+
#* {{result|EXPECTED RESULT: Watches view will show node with name ''System.getProperty("java.version")''. Other columns of the view will be empty.}}
# {{testcase|Add object watch }}
# {{testcase|Add object watch }}
-
##Invoke '''Debug | New Watch ...''' menu
+
##Invoke '''Debug > New Watch ...''' menu
##Enter name of the watch ''bundle''
##Enter name of the watch ''bundle''
#* {{result|EXPECTED RESULT: Watches view will show node with name ''bundle''. Other columns of the view will be empty.}}
#* {{result|EXPECTED RESULT: Watches view will show node with name ''bundle''. Other columns of the view will be empty.}}
# {{testcase|Watches functionality }}
# {{testcase|Watches functionality }}
-
##Put caret on line 101
+
##Put caret at line 101
##Invoke '''Run to Cursor''' action
##Invoke '''Run to Cursor''' action
-
#* {{result|EXPECTED RESULT: Watches view will show nodes with names ''taken'', ''System.getProperty("java.version")'' and ''bundle'' with types ''int'', ''String'' and ''PorpertyReourceBundle''. Value and toString() will show values of the first two watches and both columns will show the same value. Value for ''bundle'' will be its instance number. The third node will be expandable and it will contain nodes ''Static'', ''Inherited'', ''lookup''.}}
+
#* {{result|EXPECTED RESULT: Watches view will show nodes with names ''taken'', ''System.getProperty("java.version")'' and ''bundle'' with types ''int'', ''String'' and ''PropertyResourceBundle''. Value and toString() will show values of the first two watches and both columns will show the same value. Value for ''bundle'' will be its instance number. The third node will be expandable and it will contain nodes ''Static'', ''Inherited'', ''lookup''.}}
#* Teardown: Finish debugging session
#* Teardown: Finish debugging session
# {{testcase|Create fixed watch I }}
# {{testcase|Create fixed watch I }}
##Create watch ''free''
##Create watch ''free''
-
##Toggle line breakpoint on line 101
+
##Toggle line breakpoint at line 101
##Invoke '''Debug Project''' action
##Invoke '''Debug Project''' action
##Create new watch ''new Long(free)''
##Create new watch ''new Long(free)''
##Invoke '''Create Fixed Watch''' action from pop-up menu
##Invoke '''Create Fixed Watch''' action from pop-up menu
-
##Invoke '''Debug | Continue''' action
+
##Invoke '''Debug > Continue''' action
#* {{result|EXPECTED RESULT: Debugger will hit the breakpoint again. Fixed watch will display same value, the normal watch will change value.}}
#* {{result|EXPECTED RESULT: Debugger will hit the breakpoint again. Fixed watch will display same value, the normal watch will change value.}}
#* Teardown: Finish debugging session, delete breakpoint and watches
#* Teardown: Finish debugging session, delete breakpoint and watches
Line 328: Line 311:
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. Open file ''MemoryView.java'' in editor. <br>
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. Open file ''MemoryView.java'' in editor. <br>
# {{testcase|Dialog from Watches view }}
# {{testcase|Dialog from Watches view }}
-
##Invoke '''Window | Debugging | Watches''' menu
+
##Invoke '''Window > Debugging > Watches''' menu
##Invoke '''New Watch...''' from context menu of Watches view
##Invoke '''New Watch...''' from context menu of Watches view
-
#* {{result|EXPECTED RESULT: New Watch dialog will be shown. Ensure its design is the same as the design of previos dialogs.}}
+
#* {{result|EXPECTED RESULT: New Watch dialog will be shown. Ensure its design is the same as the design of previous dialogs.}}
#* Teardown: Close dialog
#* Teardown: Close dialog
# {{testcase|Dialog with code completion }}
# {{testcase|Dialog with code completion }}
-
##Toggle line breakpoint on line 101
+
##Toggle line breakpoint at line 101
##Invoke '''Debug Project''' menu
##Invoke '''Debug Project''' menu
##Invoke '''New Watch''' from context menu of Watches view
##Invoke '''New Watch''' from context menu of Watches view
Line 339: Line 322:
# {{testcase|Code completion context I }}
# {{testcase|Code completion context I }}
##Write text ''String.'' into expression field
##Write text ''String.'' into expression field
-
##If code completion is not opened automatically, press Ctrl+Space
+
##If code completion is not opened automatically, press '''Ctrl+Space'''
-
#* {{result|EXPECTED RESULT: Code completion with static memeber and static methods of class String will be opened.}}
+
#* {{result|EXPECTED RESULT: Code completion with static member and static methods of class String will be opened.}}
#* Teardown: Cancel code completion and delete written string
#* Teardown: Cancel code completion and delete written string
# {{testcase|Code completion context II }}
# {{testcase|Code completion context II }}
-
##Press Ctrl+Space
+
##Press '''Ctrl+Space'''
##Cancel code completion
##Cancel code completion
##Write text ''this.'' into expression field
##Write text ''this.'' into expression field
-
##If code completion is not opened automatically, press Ctrl+Space
+
##If code completion is not opened automatically, press '''Ctrl+Space'''
#* {{result|EXPECTED RESULT: In the first case the completion list should start with ''free'', ''r'', ''taken'' and ''total''. After this point to ''wait(timeout, nanos)'' both cases will be the same. The second case will end here and the first will continue showing items starting with ''assert'', ''boolean'', ...}}
#* {{result|EXPECTED RESULT: In the first case the completion list should start with ''free'', ''r'', ''taken'' and ''total''. After this point to ''wait(timeout, nanos)'' both cases will be the same. The second case will end here and the first will continue showing items starting with ''assert'', ''boolean'', ...}}
<br>
<br>
Line 354: Line 337:
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. Open Threads view. <br>
Setup:    Start NetBeans IDE with clear userdir. Open project ''MemoryView'' and set it as main project. Open Threads view. <br>
# {{testcase|Switch to thread }}
# {{testcase|Switch to thread }}
-
##Toggle line breakpoint on line 106 of file ''MemoryView.java''
+
##Toggle line breakpoint at line 106 of file ''MemoryView.java''
##Open breakpoint properties and select '''Suspend''' -> '''All Threads'''
##Open breakpoint properties and select '''Suspend''' -> '''All Threads'''
-
##Invoke '''Debug | New Watch''' and create watch expression ''free''
 
##Invoke '''Debug Project''' action
##Invoke '''Debug Project''' action
##Debugger should stop on the breakpoint after a while
##Debugger should stop on the breakpoint after a while
##Select node ''TimerQueue'' in the Threads view
##Select node ''TimerQueue'' in the Threads view
-
##Invoke '''Make Current''' action from contex menu of this node
+
##Invoke '''Make Current''' action from context menu of this node
#* {{result|EXPECTED RESULT: Call Stack view will show information about ''TimerQueue'' thread.}}
#* {{result|EXPECTED RESULT: Call Stack view will show information about ''TimerQueue'' thread.}}
#* Teardown: Finish debugging session and delete the breakpoint
#* Teardown: Finish debugging session and delete the breakpoint
Line 376: Line 358:
#* Teardown: Finish debugging session
#* Teardown: Finish debugging session
# {{testcase|Go to source }}
# {{testcase|Go to source }}
-
##Toggle line breakpoint on line 106 of MemoryView.java
+
##Toggle line breakpoint at line 106 of MemoryView.java
##Invoke '''Debug Project''' action
##Invoke '''Debug Project''' action
##Debugger will stop on the breakpoint after a while
##Debugger will stop on the breakpoint after a while
Line 382: Line 364:
##Select node ''system | main | main'' in the Threads view
##Select node ''system | main | main'' in the Threads view
##Invoke '''Go To Source''' action from context menu of this node
##Invoke '''Go To Source''' action from context menu of this node
-
#* {{result|EXPECTED RESULT: Source editor will be opened with file ''MemoryView.java'' and caret should be on line 106.}}
+
#* {{result|EXPECTED RESULT: Source editor will be opened with file ''MemoryView.java'' and caret should be at line 106.}}
#* Teardown: Finish debugging session and delete the breakpoint
#* Teardown: Finish debugging session and delete the breakpoint
# {{testcase|Interrupt thread }}
# {{testcase|Interrupt thread }}
-
##Toggle line breapoints on lines 39 and 59 of DeadlockTest.java
+
##Toggle line breakpoints at lines 39 and 59 of DeadlockTest.java
-
##Start debugging by Debug File action on the file
+
##Start debugging by '''Debug File''' action on the file
-
##Wait until debugger reaches the first breakpoint, press Step Over until debugger reaches line 44 (synchronized(mutex2))  
+
##Wait until debugger reaches the first breakpoint, press '''Step Over''' multiple times until debugger reaches line 44 ''(synchronized(mutex2))''
-
##Press Step Over once more
+
##Press '''Step Over''' once more
-
#* {{result|EXPECTED RESULT: Debugger will act as suspended, Debugging view will be contain the information 'Step is blocked by suspended thread 'Thread-1'. Resume this thread to proceed?' and 'New Breakpoint Hit' with option to move to that breakpoint. .}}
+
#* {{result|EXPECTED RESULT: Debugger will act as suspended, Debugging view will contain the information ''Step is blocked by suspended thread 'Thread-1'. Resume this thread to proceed?'' and ''New Breakpoint Hit'' with option to move to that breakpoint. .}}
# {{testcase|Interrupt thread - Resume }}
# {{testcase|Interrupt thread - Resume }}
#* Setup:    Continue with previous test case
#* Setup:    Continue with previous test case
-
##Press Resume button in Debugging view.
+
##Press '''Resume''' button in Debugging view.
-
#* {{result|EXPECTED RESULT: Program will be running but both threads will show state 'On Monitor'. Synchronization probably didn't occur. Therefore no action will be visible. }}
+
#* {{result|EXPECTED RESULT: Program will be running but both threads will show state ''On Monitor'' in the Threads view. Synchronization probably didn't occur. Therefore no action will be visible. }}
# {{testcase|Interrupt thread - Go to Breakpoint }}
# {{testcase|Interrupt thread - Go to Breakpoint }}
-
#* Setup:  Stop debugging session. Leave brekapoints on the same lines (39, 59)
+
#* Setup:  Stop debugging session. Leave breakpoints on the same lines (39, 59)
-
##Invoke debuge file action
+
##Invoke '''Debug File''' action
-
##Wait until debugger stops at line 39 and a 'New Breakpoint Hit' information appears in debugging window.  
+
##Wait until debugger stops at line 39 and a ''New Breakpoint Hit'' information appears in debugging window.  
##Press the arrow at mentioned information
##Press the arrow at mentioned information
#* {{result|EXPECTED RESULT: Debugger will jump to line 59 and continue debugging of method Thread2.run().}}
#* {{result|EXPECTED RESULT: Debugger will jump to line 59 and continue debugging of method Thread2.run().}}
Line 407: Line 389:
# {{testcase|Suspend debugging - all threads }}
# {{testcase|Suspend debugging - all threads }}
##Open file ''ThreadSuspending.java'' in editor
##Open file ''ThreadSuspending.java'' in editor
-
##Toggle line breakpoint on line 39
+
##Toggle line breakpoint at line 39
##Select corresponding breakpoint in the Breakpoints view
##Select corresponding breakpoint in the Breakpoints view
##Invoke '''Properties''' from context menu and change Suspend property of this breakpoint to ''All threads''
##Invoke '''Properties''' from context menu and change Suspend property of this breakpoint to ''All threads''
Line 427: Line 409:
# {{testcase|Go To Source }}
# {{testcase|Go To Source }}
##Open file ''MemoryView.java'' in editor
##Open file ''MemoryView.java'' in editor
-
##Toggle line breakpoint on line 96
+
##Toggle line breakpoint at line 96
##Close source in editor
##Close source in editor
##Select corresponding breakpoint in the Breakpoints view
##Select corresponding breakpoint in the Breakpoints view
##Invoke '''Go to Source''' action from the context menu of this node
##Invoke '''Go to Source''' action from the context menu of this node
-
#* {{result|EXPECTED RESULT: Source Editor should be opened with file MemoryView.java with caret on line 96}}
+
#* {{result|EXPECTED RESULT: Source Editor should be opened with file MemoryView.java with caret at line 96}}
#* Teardown: Remove breakpoint
#* Teardown: Remove breakpoint
<br>
<br>
Line 442: Line 424:
# {{testcase|Debug all threads }}
# {{testcase|Debug all threads }}
##Open ThreadSuspending.java file
##Open ThreadSuspending.java file
-
##Place line breakpoint on line 39
+
##Place line breakpoint at line 39
##Invoke properties on the breakpoint and change Suspend property to ''All threads''
##Invoke properties on the breakpoint and change Suspend property to ''All threads''
-
##Start debugging by Debug File action
+
##Start debugging by '''Debug File''' action
-
##Wait the breakpoint is hit, go to Sessions view, select current session and invoke its popup menu settings ''Scope | Debug All Threads''
+
##Wait until the breakpoint is hit, go to Sessions view, select current ''tests.ThreadSuspending'' session and invoke ''Scope | Debug All Threads'' from its popup menu
-
##Invoke Step Over action a few times
+
##Invoke '''Step Over''' action a few times
-
#* {{result|EXPECTED RESULT: Debugged application will start with a few logs from Thread-1. After the session settings and Step Over actions there will be mixed logs from Thread-1 and Thread-2 in output window.}}
+
#* {{result|EXPECTED RESULT: Debugged application will start with a few logs from Thread-1. After the session settings and '''Step Over''' actions there will be mixed logs from Thread-1 and Thread-2 in output window.}}
# {{testcase|Debug current thread }}
# {{testcase|Debug current thread }}
## Continue with previous testcase ('''Debug all threads''')
## Continue with previous testcase ('''Debug all threads''')
## Select the current session in Sessions view and invoke its popup menu
## Select the current session in Sessions view and invoke its popup menu
## Select ''Scope | Debug Current Thread''
## Select ''Scope | Debug Current Thread''
-
## Invoke Step Over action a few times
+
## Invoke '''Step Over''' action a few times
-
#* {{result|EXPECTED RESULT: There will be only logs from Thread-2 after this set of Step Over actions. }}
+
#* {{result|EXPECTED RESULT: There will be only logs from Thread-2 after this set of '''Step Over''' actions. }}
#* Teardown: Finish debugging session and remove breakpoint
#* Teardown: Finish debugging session and remove breakpoint
# {{testcase|View Session Languages }}
# {{testcase|View Session Languages }}
#* Setup:    Open JSPExamples Project. Make sure Glassfish v2 or v3 is installed and working properly.  
#* Setup:    Open JSPExamples Project. Make sure Glassfish v2 or v3 is installed and working properly.  
##Open Projects Tab
##Open Projects Tab
-
##Toggle breakpoint on line 25 in date.jsp. (WebPages -> dates -> date.jsp)
+
##Toggle breakpoint at line 25 in date.jsp. (WebPages -> dates -> date.jsp)
-
##Toggle breakpoint on line 27 in JspCalendar.java (SourcePackages -> dates -> JspCalendar.java)
+
##Toggle breakpoint at line 27 in JspCalendar.java (SourcePackages -> dates -> JspCalendar.java)
-
##Invoke Clean and Build Project
+
##Invoke '''Clean and Build''' from popup menu of the JSPExamples project.
-
##Debug Project (Ctrl + F5)
+
##Invoke '''Debug''' on the JSPExamples project or press '''Ctrl + F5'''.
-
#* {{result|EXPECTED RESULT: A web page should open in your default browser.}}
+
#* {{result|EXPECTED RESULT: A ''JSP Examples'' web page should open in your default browser.}}
-
##Choose Date -> Execute on the page
+
##Find ''JSP 1.2 Examples'' section and click '''Execute''' link in the ''Date'' row
-
##Execution should stop on line 27 of JspCalendar.java
+
##Execution should stop at line 27 of JspCalendar.java
-
##Press Continue from debugging menu (F5)
+
##Invoke '''Debug > Continue''' from main menu or press '''F5'''
-
##Execution should stop on line 25 of date.jsp
+
##Execution should stop at line 25 of date.jsp
-
##Choose Language -> Java from session context menu.  
+
##Choose '''Language -> Java''' from session context menu.  
-
#* {{result|EXPECTED RESULT: Debugging view should stay the same after language change. There should be Java Language set at JSPExamples Session in Session View. Local Variables View should change and show local Java variables not JSPVariables such as Request, Session, Context Attributes and Implicit Objects.}}
+
#* {{result|EXPECTED RESULT: Debugging view should stay the same after language change. There should be Java Language set at JSPExamples Session in Sessions View. Local Variables View should change and show local Java variables not JSPVariables such as Request, Session, Context Attributes and Implicit Objects.}}
-
##Choose Language -> JSP in session view at particluar row using Select Box.  
+
##Choose '''Language -> JSP''' in session view at particular row using Select Box.  
-
#* {{result|EXPECTED RESULT: Debugging view should stay the same after language change. There should be JSP Language set at JSPExamples Session in Session View. Local Variables View should change and show local JSP variables only.}}
+
#* {{result|EXPECTED RESULT: Debugging view should stay the same after language change. There should be JSP Language set at JSPExamples Session in Sessions View. Local Variables View should change and show local JSP variables only.}}
#* Teardown: Close all debugger sessions.
#* Teardown: Close all debugger sessions.
<br>
<br>
 +
====Test suite: Resume/Suspend threads. (Multithread)====
====Test suite: Resume/Suspend threads. (Multithread)====
Purpose:  Verifies the functionality of threads table buttons <br>
Purpose:  Verifies the functionality of threads table buttons <br>
Line 479: Line 462:
# {{testcase|Suspend running thread}}  
# {{testcase|Suspend running thread}}  
##Make sure that Debugging view is opened.
##Make sure that Debugging view is opened.
-
##Select ThreadSuspending1.java, invoke '''Debug "ThreadSuspending1.java"''' popup menu action and switch to Debugging view.
+
##Select ThreadSuspending1.java, invoke '''Debug File''' popup menu action and switch to Debugging view.
-
##Make sure that Show suspend/resume table button is turned on and Show system threads button is turned off.
+
##Make sure that ''Show suspend/resume table'' button is turned on and ''Show system threads'' button is turned off.
##3 threads should be running.  
##3 threads should be running.  
-
##Select Thread-1, invoke '''Make Current''' from its popup menu and push SUSPEND button.
+
##Select Thread-1, invoke '''Make Current''' from its popup menu and push '''Suspend thread Thread-1''' button.
-
#* {{result|EXPECTED RESULT: Thread-1 should be suspended. This thread also should be marked as Current Thread by green bar in the left. Its title should be changed to Thread-1 suspended at Thread.sleep. Appropriate node for this thread should expandable (+). There should be shown thread frame where the thread was suspended. The Debugger Console tab of Output view prints Thread Thread-1 stopped at Thread.java.sleep. The left icon (with SUSPEND) next to node should be orange. The button for this thread should change to RESUME }}
+
#* {{result|EXPECTED RESULT: Thread-1 should be suspended. This thread also should be marked as Current Thread by green bar in the left. Its title should be changed to Thread-1 suspended at Thread.sleep. Appropriate node for this thread should be expandable (+). There should be shown thread frame where the thread was suspended. The Debugger Console tab of Output view prints Thread Thread-1 stopped at Thread.java.sleep. The left icon of the node should be orange. The button for this thread should change to '''Resume thread Thread-1'''}}
# {{testcase|Resume suspended thread}}  
# {{testcase|Resume suspended thread}}  
##Make sure that Debugging view is opened.
##Make sure that Debugging view is opened.
-
##Make sure that Show suspend/resume table button is turned on and Show system threads button is off.
+
##Make sure that ''Show suspend/resume table'' button is turned on and ''Show system threads'' button is off.
-
##Push RESUME button next to suspended Thread-1 suspended at Thread.sleep in Debugging view.
+
##Push '''Resume thread Thread-1''' button next to ''Thread-1 suspended at Thread.sleep'' text in Debugging view.
-
#* {{result|EXPECTED RESULT: Thread-1 should be running. The Debugger Console tab of Output view prints User Program running. Its title should be changed back to Thread-1. Now the left icon (without SUSPEND) next to node should be green. The button for this thread should change to SUSPEND }}
+
#* {{result|EXPECTED RESULT: Thread-1 should be running. The Debugger Console tab of Output view prints ''User program running''. Its title should be changed back to Thread-1. Now the left icon of the node should be green. The button for this thread should change to '''Suspend thread Thread-1'''}}
# {{testcase|Suspend running thread - popup menu}}  
# {{testcase|Suspend running thread - popup menu}}  
##Make sure that Debugging view is opened.
##Make sure that Debugging view is opened.
Line 494: Line 477:
##3 threads should be running.  
##3 threads should be running.  
##Select Thread-1 thread and invoke '''Suspend''' popup menu action. (Make Current item has to be disabled and Suspend and Interrupt items have to be enabled)
##Select Thread-1 thread and invoke '''Suspend''' popup menu action. (Make Current item has to be disabled and Suspend and Interrupt items have to be enabled)
-
#* {{result|EXPECTED RESULT: Thread-1 should be suspended. This thread also should be marked as Current Thread by green bar in the left. Its title should be changed to Thread-1 suspended at Thread.sleep. Appropriate node for this thread should expandable (+). There should be shown thread frame where the thread was suspended. The Debugger Console tab of Output view prints Thread Thread-1 stopped at Thread.java.sleep. The left icon (with SUSPEND) next to node should be orange. The button for this thread should change to RESUME }}
+
#* {{result|EXPECTED RESULT: Thread-1 should be suspended. This thread also should be marked as Current Thread by green bar in the left. Its title should be changed to Thread-1 suspended at Thread.sleep. Appropriate node for this thread should expandable (+). There should be shown thread frame where the thread was suspended. The Debugger Console tab of Output view prints Thread Thread-1 stopped at Thread.java.sleep. The left icon of the node should be orange. The button for this thread should change to '''Resume thread Thread-1'''}}
# {{testcase|Resume suspended thread - popup menu}}  
# {{testcase|Resume suspended thread - popup menu}}  
##Make sure that Debugging view is opened.
##Make sure that Debugging view is opened.
##Select suspended Thread-1 suspended at Thread.sleep in Debugging view and invoke '''Resume''' popup menu action. (Make Current and Interrupt items have to be disabled)
##Select suspended Thread-1 suspended at Thread.sleep in Debugging view and invoke '''Resume''' popup menu action. (Make Current and Interrupt items have to be disabled)
-
#* {{result|EXPECTED RESULT: Thread-1 should be running. The Debugger Console tab of Output view prints User Program running. Its title should be changed back to Thread-1. Now the left icon (without SUSPEND) next to node should be green. The button for this thread should change to SUSPEND }}
+
#* {{result|EXPECTED RESULT: Thread-1 should be running. The Debugger Console tab of Output view prints ''User program running''. Its title should be changed back to Thread-1. Now the left icon of the node should be green. The button for this thread should change to '''Suspend thread Thread-1'''}}
# {{testcase|Multiple selection}}
# {{testcase|Multiple selection}}
##Select more than 1 thread and invoke popup menu.
##Select more than 1 thread and invoke popup menu.
-
#* {{result|EXPECTED RESULT: For threads in running state there should be Interrupt and Suspend actions enabled. For threads in suspended state there should be Resume action enabled only.  For threads in different state (suspended and running) all action should be disabled. }}
+
#* {{result|EXPECTED RESULT: For threads in running state there should be Interrupt and Suspend actions enabled. For threads in suspended state there should be Resume action enabled only.  For threads in different states (suspended and running) all actions should be disabled. }}
# {{testcase|Set Current Thread}}
# {{testcase|Set Current Thread}}
-
##Suspend All Threads
+
##'''Suspend''' all threads
-
##Make Thread 3 current as described in Test suite: Debugging application, point 3 of this document
+
##Invoke '''Make Current''' from popup menu of Thread 3
-
##Invoke Debug from main menu
+
##Invoke '''Debug > Set Current Thread''' from main menu
-
##Choose Set Current Thread option
+
##Choose Thread 2  
##Choose Thread 2  
-
##Confirm by enter
+
##Confirm by '''Enter'''
#* {{result|EXPECTED RESULT: Thread should be highlighted and set as current. }}
#* {{result|EXPECTED RESULT: Thread should be highlighted and set as current. }}
-
#* Teardown: Stop debugged application - invoke '''Debug | Finish Debugger Session''' from main menu.
+
#* Teardown: Stop debugged application - invoke '''Debug > Finish Debugger Session''' from main menu.
<br>
<br>
Line 517: Line 499:
Setup:    Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. <br>  
Setup:    Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. <br>  
# {{testcase|Stopping at breakpoints}}  
# {{testcase|Stopping at breakpoints}}  
-
##Open ThreadSuspending1.java file and put breakpoints to 28, 47, and 63 lines (line contains i++;)
+
##Open ''ThreadSuspending1.java'' file and put breakpoints to 28, 47, and 63 lines (line contains i++;)
-
##Invoke '''Debug "ThreadSuspending1.java"''' popup menu action and switch to Debugging view.
+
##Invoke '''Debug File''' popup menu action and switch to Debugging view.
-
#* {{result|EXPECTED RESULT: In a moment Thread-1, Thread-2 and Thread-3 should be suspended annotated with orange icon with red rectagle. For each application thread there should be RESUME button available. Thread-1 has to be marked as Current Thread by green bar. Thread-2 and Thread-3 have to be suspended - yellow bar. Application threads must be expandable (+). Ensure that each thread was suspended on appropriate line as defined in step 1. In the bottom of Debugging view another panel should appear. Verify that New Breakpoint Hits (2) and bold arrow are present in the bottom of Debugging view. Scroll down BOLD ARROW: Thread-2 stopped at LineBreakPoint ThreadSuspendin.java:47 and Thread-3 stopped at LineBreakPoint ThreadSuspendin.java:63 have to be there. Debugger Console of Output there has to be
+
#* {{result|EXPECTED RESULT: In a moment Thread-1, Thread-2 and Thread-3 should be suspended annotated with orange icon with red rectangle. For each application thread there should be ''Resume thread Thread-x'' button available. Thread-1 has to be marked as Current Thread by green bar. Thread-2 and Thread-3 have to be suspended - yellow bar. Application threads must be expandable (+). Ensure that each thread was suspended on appropriate line as defined in step 1. In the bottom of Debugging view another panel should appear. Verify that New Breakpoint Hits (2) and bold arrow are present in the bottom of Debugging view. Scroll down BOLD ARROW: Thread-2 at line breakpoint ThreadSuspending1.java:47 and Thread-3 at line breakpoint ThreadSuspending1.java:63 have should be there. Debugger Console of Output should read:
-
#** Listening on port <portnumber>
+
#** Listening on <portnumber>
#** User program running
#** User program running
-
#** LineBreakPoint ThreadSuspending1.java : 28 successfully submitted.  
+
#** LineBreakpoint ThreadSuspending1.java : 28 successfully submitted.  
-
#** LineBreakPoint ThreadSuspending1.java : 47 successfully submitted.
+
#** LineBreakpoint ThreadSuspending1.java : 47 successfully submitted.
-
#** LineBreakPoint ThreadSuspending1.java : 63 successfully submitted.
+
#** LineBreakpoint ThreadSuspending1.java : 63 successfully submitted.
-
#** Breakpoint hit at line 28 in class tests.ThreadSuspending$1 by thread Thread-1.
+
#** Breakpoint hit at line 28 in class tests.ThreadSuspending1$1 by thread Thread-1.
-
#** Thread Thread-1 stopped at ThreadSuspendin.java:28.
+
#** Thread Thread-1 stopped at ThreadSuspending1.java:28.
-
#** Breakpoint hit at line 47 in class tests.ThreadSuspending$2 by thread Thread-2.
+
#** Breakpoint hit at line 47 in class tests.ThreadSuspending1$2 by thread Thread-2.
-
#** Breakpoint hit at line 63 in class tests.ThreadSuspending$3 by thread Thread-3.}}
+
#** Breakpoint hit at line 63 in class tests.ThreadSuspending1$3 by thread Thread-3.}}
# {{testcase|Resuming threads}}  
# {{testcase|Resuming threads}}  
##Switch to Debugging view
##Switch to Debugging view
Line 536: Line 518:
##Switch to Debugging view and select non current thread which encountered breakpoint.
##Switch to Debugging view and select non current thread which encountered breakpoint.
##Invoke '''Make Current''' popup menu action.
##Invoke '''Make Current''' popup menu action.
-
#* {{result|EXPECTED RESULT: This thread should be marked as current (Thread title should be ) with green bar, highlighted breakpoint (green line in editor) belongs to current thread now. New Breakpoint Hits decreases by 1.}}
+
#* {{result|EXPECTED RESULT: This thread should be marked as current with green bar, highlighted breakpoint (green line in editor) belongs to current thread now. New Breakpoint Hits decreases by 1.}}
# {{testcase|Change Current Thread II}}  
# {{testcase|Change Current Thread II}}  
##Switch to Debugging view
##Switch to Debugging view
Line 543: Line 525:
##Expand current thread node.
##Expand current thread node.
#* {{result|EXPECTED RESULT: This thread should be marked as current (method of suspended thread is printed in BOLD only, collapsing thread node should make thread's name bold again) with green bar, highlighted breakpoint (green line in the editor) belongs to current thread now.  New Breakpoint Hits decreases by 1.
#* {{result|EXPECTED RESULT: This thread should be marked as current (method of suspended thread is printed in BOLD only, collapsing thread node should make thread's name bold again) with green bar, highlighted breakpoint (green line in the editor) belongs to current thread now.  New Breakpoint Hits decreases by 1.
-
#* Teardown: Stop debugged application - invoke '''Run | Finish Debugger Session''' from main menu.}}
+
#* Teardown: Stop debugged application - invoke '''Debug > Finish Debugger Session''' from main menu.}}
# {{testcase|Current Thread Chooser}}  
# {{testcase|Current Thread Chooser}}  
-
##Invoke '''Debug ThreadSuspending1.java''' popup menu action.
+
##Invoke '''Debug File''' popup menu action.
##In a while all application threads should be suspended.
##In a while all application threads should be suspended.
-
##Press '''ALT+SHIFT+T''' - "Current Thread Chooser" dialog should be shown.
+
##Invoke '''Debug > Set Current Thread''' from main menu.
-
##Holding both '''ALT''' and '''SHIFT''' key and pushing '''T''' key should switch among all suspended threads.
+
#* {{result|EXPECTED RESULT: Verify the functionality of choosing current thread. Chosen thread should be always indicated in ''Debugging'' view by green bar next to it.
-
#* {{result|EXPECTED RESULT: Verify the functionality of choosing current thread. Chosen thread should be also indicated in ''Debugging'' view by green bar next to it.
+
#* Teardown: Stop debugged application - invoke '''Debug > Finish Debugger Session''' from main menu.}}
-
#* Teardown: Stop debugged application - invoke '''Run | Finish Debugger Session''' from main menu.}}
+
# {{testcase|Monitors}}  
# {{testcase|Monitors}}  
-
##Edit ThreadSuspending1.java. Surround i++; line with synchronized (this) {} and make sure that breakpoints are set for lines increasing variable i
+
##Edit ''ThreadSuspending1.java''. Surround i++; line with synchronized (this) {} and make sure that breakpoints are set for lines increasing variable i
-
##Invoke '''Debug ThreadSuspending1.java''' popup menu action.
+
##Invoke '''Debug File''' popup menu action.
##In a while all application threads should be suspended.
##In a while all application threads should be suspended.
-
##Push Show monitors button from the toolbar of Debugging view.
+
##Push ''Show monitors'' button from the toolbar of Debugging view.
#* {{result|EXPECTED RESULT: Monitors for each thread should be shown for appropriate line in thread frame of Debugging view.
#* {{result|EXPECTED RESULT: Monitors for each thread should be shown for appropriate line in thread frame of Debugging view.
-
#* Teardown: Stop debugged application - invoke '''Run | Finish Debugger Session''' from main menu.}}
+
#* Teardown: Stop debugged application - invoke '''Debug > Finish Debugger Session''' from main menu.}}
# {{testcase|Deadlock detection}}  
# {{testcase|Deadlock detection}}  
-
##Select DeadlockTest.java and '''Debug DeadlockTest.java''' popup menu action.
+
## Right click ''DeadlockTest.java'' file and invoke '''Debug File''' popup menu action.
-
##Invoke debugging view's context menu  
+
## Invoke debugging view's context menu.
-
##select check for deadlock option
+
## Select '''Check for Deadlock''' option.
-
#* {{result|EXPECTED RESULT: Over the Debugging toolbar there should appear yellow panel with Deadlock detected label.
+
#* {{result|EXPECTED RESULT: Above the Debugging view toolbar there should appear yellow panel with ''Deadlock detected'' label.
-
#* Teardown: Stop debugged application - invoke '''Run | Finish Debugger Session''' from main menu.}}
+
#* Teardown: Stop debugged application - invoke '''Debug > Finish Debugger Session''' from main menu.}}
<br>
<br>
Line 570: Line 551:
Setup:    Start NetBeans with clean userdir. Open/create sample project AnagramGame. Switch to Files view. <br>
Setup:    Start NetBeans with clean userdir. Open/create sample project AnagramGame. Switch to Files view. <br>
# {{testcase|Start debugging }}
# {{testcase|Start debugging }}
-
##Select node ''build.xml'' and invoke from its contex menu '''Debug Target | run'''
+
##Select node ''build.xml'' and invoke from its context menu '''Debug Target > run'''
-
#* {{result|EXPECTED RESULT: Debugger stops on line 35 of ''build.xml'' opened in editor. Variables, Watches and Call Stack debugger views are opened. Output contains two tabs: ''anagram (run)'' and ''build.xml''}}
+
#* {{result|EXPECTED RESULT: Debugger stops at line 35 of ''build.xml'' opened in editor. Variables, Watches and Call Stack debugger views are opened. Output contains two tabs: ''anagrams (run)'' and ''build.xml''}}
#* Teardown: Finish debugging session
#* Teardown: Finish debugging session
# {{testcase|Finish debugging }}
# {{testcase|Finish debugging }}
#* Setup:    Perform steps from Start debugging case
#* Setup:    Perform steps from Start debugging case
-
##Finish debugging session
+
##Invoke '''Debug > Finish Debugging Session''' from main menu
#* {{result|EXPECTED RESULT: Program counter is not displayed any more. Debugger toolbar is closed. Target run is not executed (check messages in ant-debugger-tests output). Debugger views are closed}}
#* {{result|EXPECTED RESULT: Program counter is not displayed any more. Debugger toolbar is closed. Target run is not executed (check messages in ant-debugger-tests output). Debugger views are closed}}
# {{testcase|Step over }}
# {{testcase|Step over }}
#* Setup:    Perform steps from Start debugging case
#* Setup:    Perform steps from Start debugging case
##Invoke action '''Step Over''' two times
##Invoke action '''Step Over''' two times
-
#* {{result|EXPECTED RESULT: Program counter is on line 474 in build-impl.xml at the beginning of EXECUTION SECTION.}}
+
#* {{result|EXPECTED RESULT: Program counter is at line 710 in build-impl.xml at the beginning of EXECUTION SECTION.}}
#* Teardown: Finish debugging session
#* Teardown: Finish debugging session
# {{testcase|Step into }}
# {{testcase|Step into }}
Line 586: Line 567:
##Invoke action '''Step Over''' 4 times
##Invoke action '''Step Over''' 4 times
##Invoke action '''Step Into'''
##Invoke action '''Step Into'''
-
#* {{result|EXPECTED RESULT: Program counter is on line 475. Whole target "j2seproject1" node has green background. Call stack view displays nodes ''j2seproject1'' and ''run''}}
+
#* {{result|EXPECTED RESULT: Program counter is at line 711. Whole target "j2seproject1:java" node has green background. Call stack view displays nodes ''j2seproject1.java'' and ''run''}}
#* Teardown: Finish debugging session
#* Teardown: Finish debugging session
# {{testcase|Step out }}
# {{testcase|Step out }}
#* Setup:    Perform steps from Start debugging case
#* Setup:    Perform steps from Start debugging case
##Invoke action '''Step Into''' 8 times
##Invoke action '''Step Into''' 8 times
-
#* {{result|EXPECTED RESULT: Program counter is on line 41. Target ''-init-private'' is executed. Program counter is on first property line.}}
+
#* {{result|EXPECTED RESULT: Program counter is at line 41. Target ''-init-private'' is executed. Program counter is on first property line.}}
-
##Invoke action '''Step Out''' 3 times
+
##Invoke action '''Step Out''' 5 times
-
#* {{result|EXPECTED RESULT: Program counter is on line 474 inside build-impl.xml and whole target ''run'' has green background.}}
+
#* {{result|EXPECTED RESULT: Program counter is at line 710 inside build-impl.xml and whole target ''run'' has green background.}}
#* Teardown: Finish debugging session
#* Teardown: Finish debugging session
<br>
<br>
Line 601: Line 582:
Setup:    Start NetBeans with clean userdir. Open/create sample project AnagramGame. Switch to Files view and open build.xml file. <br>
Setup:    Start NetBeans with clean userdir. Open/create sample project AnagramGame. Switch to Files view and open build.xml file. <br>
# {{testcase|Toggle breakpoint }}
# {{testcase|Toggle breakpoint }}
-
##Toggle breakpoint on line 36
+
##Toggle breakpoint at line 36
#* {{result|EXPECTED RESULT: Line 36 is highlighted with red background and red square in gutter}}
#* {{result|EXPECTED RESULT: Line 36 is highlighted with red background and red square in gutter}}
#* Teardown: Remove breakpoint
#* Teardown: Remove breakpoint
# {{testcase|Breakpoint functionality }}
# {{testcase|Breakpoint functionality }}
#* Setup:    Perform step from Toggle breakpoint case
#* Setup:    Perform step from Toggle breakpoint case
-
##Select node ''build.xml'' and invoke from its contex menu '''Debug Target|run'''
+
##Select node ''build.xml'' and invoke from its context menu '''Debug Target > run'''
##Invoke '''Continue''' action
##Invoke '''Continue''' action
-
#* {{result|EXPECTED RESULT: Program counter is on line 36. The line is highlighted with green background and red square with green arrow in gutter}}
+
#* {{result|EXPECTED RESULT: Program counter is at line 36. The line is highlighted with green background and red square with green arrow in gutter}}
#* Teardown: Finish debugger and remove breakpoint
#* Teardown: Finish debugger and remove breakpoint
# {{testcase|Continue after breakpoint }}
# {{testcase|Continue after breakpoint }}
-
#* Setup:    Perform steps from Breapkoint functionality case
+
#* Setup:    Perform steps from Breakpoint functionality case
##Invoke '''Continue''' action
##Invoke '''Continue''' action
-
#* {{result|EXPECTED RESULT: Rest of target run is executed without stopping. Debugger views are closed}}
+
#* {{result|EXPECTED RESULT: Rest of target run is executed without stopping.}}
#* Teardown: Remove breakpoint
#* Teardown: Remove breakpoint
# {{testcase|Finish debugger does not stop on breakpoint }}
# {{testcase|Finish debugger does not stop on breakpoint }}
#* Setup:    Perform step from Toggle breakpoint case
#* Setup:    Perform step from Toggle breakpoint case
-
##Select node ''build.xml'' and invoke from its contex menu '''Debug Target|run'''
+
##Select node ''build.xml'' and invoke from its context menu '''Debug Target > run'''
##Invoke '''Finish Debugger Session''' action
##Invoke '''Finish Debugger Session''' action
-
#* {{result|EXPECTED RESULT: Program counter is not displayed any more. Target run is not executed (check messages in ant-debugger-test output). Debugger views are closed}}
+
#* {{result|EXPECTED RESULT: Program counter is not displayed any more. Target run is not executed (check messages in ant-debugger-test output). Debugger views are closed.}}
#* Teardown: Remove breakpoint
#* Teardown: Remove breakpoint
# {{testcase|Disable breakpoint }}
# {{testcase|Disable breakpoint }}
#* Setup:    Perform step from Toggle breakpoint case
#* Setup:    Perform step from Toggle breakpoint case
-
##Invoke '''Window|Debugging|Breakpoints''' action
+
##Invoke '''Window > Debugging > Breakpoints''' action
##In Breakpoints view select breakpoint ''build.xml:36'' and invoke '''Disable''' from its context menu
##In Breakpoints view select breakpoint ''build.xml:36'' and invoke '''Disable''' from its context menu
-
##Select node ''build.xml'' and invoke from its context menu '''Debug Target|run'''
+
##Select node ''build.xml'' and invoke from its context menu '''Debug Target > run'''
##Invoke '''Continue''' action
##Invoke '''Continue''' action
-
#* {{result|EXPECTED RESULT: Program counter is not displayed any more. Target run is fully executed without stopping (check messages in output window). Debugger views are closed}}
+
#* {{result|EXPECTED RESULT: Program counter is not displayed any more. Target run is fully executed without stopping (check messages in output window).}}
#* Teardown: Remove breakpoint
#* Teardown: Remove breakpoint
<br>
<br>
Line 637: Line 618:
##On line 34 inside build.xml file select text  ''name''
##On line 34 inside build.xml file select text  ''name''
##Invoke action '''New Watch''' from editor context menu, modify text to "ant.project.name" and press '''OK''' in '''New Watch''' dialog
##Invoke action '''New Watch''' from editor context menu, modify text to "ant.project.name" and press '''OK''' in '''New Watch''' dialog
-
##Select node build.xml and invoke from its context menu '''Debug Target|run'''
+
##Select node build.xml and invoke from its context menu '''Debug Target > run'''
-
#* {{result|EXPECTED RESULT: Program counter is on line 35. Watches view shows watch ant.project.name with value anagrams}}
+
#* {{result|EXPECTED RESULT: Program counter is at line 35. Watches view shows watch ant.project.name with value anagrams}}
#* Teardown: Finish debugging session and delete watch
#* Teardown: Finish debugging session and delete watch
# {{testcase|Local variables }}
# {{testcase|Local variables }}
-
##Select node build.xml and invoke from its context menu '''Debug Target|run'''
+
##Select node build.xml and invoke from its context menu '''Debug Target > run'''
-
##Invoke '''Window|Debugging|Local Variables''' from main menu
+
##Invoke '''Window > Debugging > Variables''' from main menu
-
#* {{result|EXPECTED RESULT: Local Variables lists all properties set for the build script. List contains ant.project.name with value anagrams}}
+
#* {{result|EXPECTED RESULT: Variables lists all properties set for the build script. List contains ant.project.name with value anagrams}}
#* Teardown: Finish debugging session
#* Teardown: Finish debugging session
<br>
<br>

Current revision as of 14:29, 23 February 2012

Debugger Sanity Test Specification for NetBeans 6.8

Authors: Jiri Kovalsky, Vojtech Sigler and Filip Zamboj
Version: 1.1
Last update: 2011/02/28
Introduction: Testcases for sanity testing all subcomponents of debugger module in NetBeans ide. (In Bugzilla: debugger->Java, Code, Ant)
Comments: There are used test projects MemoryView and FreeForm and JSPExamples in test cases.

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
    1. Perform this setting on each test suite if instructions in test suite are not stating anything else
    2. Open your testing project according to test suite
    3. Invoke from main panel Window > Debugger > Sources
    4. uncheck <JAVA_HOME>/src.zip


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 button > 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


Test suite: Evaluate Expression View

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

  1. Expression Evaluator view
    1. Open file MemoryView.java in editor
    2. Toggle line breakpoint at line 45.
    3. Push from main menu Debug > Debug Main Project
    4. Push from main menu Debug > Evaluate Expression...
    • EXPECTED RESULT: Make sure that Expression Evaluator appeared between Editor and bottom Task panel. There must be a History button (triangle or arrow pointing down) and Evaluate Code Fragment button (a green arrow-like shape)
    • Teardown: Close the project


Test suite: Evaluate expression

Purpose: Verify functionality of the evaluator window
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open file MemoryView.java in editor. Toggle line breakpoint at line 106 (text: text.invalidate();) and invoke Debug project action. Make sure that the violet diamond is pressed in Variables view!

  1. Primitive types
    1. Invoke Debug > Evaluate Expression action
    2. To expression field write {(int)(total-free);}
    3. Press Evaluate button
    • EXPECTED RESULT: The expression {(int)(total-free);} is not valid. Dialog with text "Malformed Expression: "(ERROR)"" and a button OK should appear.
  2. Variables
    1. Invoke Debug > Evaluate Expression action
    2. To expression field write return text.getText();
    3. Press Evaluate button
    • EXPECTED RESULT: Result list will contain result with name return text.getText() of type String and "Used ... bytes of ... allocated memory" String value
    • Teardown: Close the project
  3. Evaluation result view
    1. Continue with testcase Variables
    2. Put the following into the expression field: "Hello" and press the Evaluate expression button twice
    3. In Variables view click on the violet diamond
    • EXPECTED RESULT: The violet node disappears from the Variables view and a separate view titled Evaluation Result opens. The view contains a violet node with the latest evaluation result and a History node, which is expandable and contains all previous expressions (return text.getText(); and "Hello".


Test suite: View filters

Purpose: Verifies functionality of filters in Variables and Watches view
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open file LineBreakpoints.java in editor. Toggle line breakpoint at line 200. Invoke Debug File action from context menu of the file in Projects explorer. Open Watches view.

  1. Primitive filter
    1. Create watch n
    2. Select the watch and invoke Display as ... action
    • EXPECTED RESULT: The value will be displayed in these formats:
      • Decimal - 50
      • Hexadecimal - 0x32
      • Octal - 062
      • Binary - 110010
      • Character - '2'
      • toString() column will change in primitive types as display type changes.
  2. Filter based on value
    1. Create new watch string (note: You should have two watches active in your watches view, n of type int and string of type String)
    2. Select the watch you created in previous testcase and invoke Show only rows where ... action on column value of watch n
    • EXPECTED RESULT: You should have several possibilities to filter watches:
      • Type == 50 with a result shows only n watch
      • Type <> 50 with a result shows only string watch
      • Type > 50 with a result shows no watch (note: to remove the filter invoke popup menu somewhere in the value column and select Show only rows where > No Filter )
      • Type < 50 with a result shows only string watch
      • Type >= 50 with a result shows only n watch
      • Type <= 50 with a result shows only n and string watch
      • No filter with a result shows both watches
    • Teardown: Delete watch


Test suite: Basic functionality

Purpose: Verification of basic debugger functionality: start, stop, stop on breakpoint, etc.
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project.

  1. Breakpoint functionality
    1. Open file MemoryView.java in editor
    2. Place your caret at line 101
    3. Invoke Toggle Line Breakpoint action from editor's popup menu
    4. Invoke Debug Project action from menu or toolbar
    • EXPECTED RESULT: Debugger will be started and after a while it will stop at line 101
    • Teardown: Remove the breakpoint
  2. Run to cursor
    • Setup: Proceed steps from Breakpoint functionality testcase
    1. Press F5 - an application window should appear a debugger should stop again at breakpoint at line 101
    2. Place your caret at line 96
    3. Invoke Run to Cursor action from menu or toolbar
    • EXPECTED RESULT: Debugger will run for a while and stop at line 96.
    • Teardown: Finish debugging session
  3. Run to cursor - start debugging
    1. Open file MemoryView.java in editor
    2. Place your caret at line 101
    3. Invoke Run to Cursor action from menu or toolbar
    • EXPECTED RESULT: Debugger will start and run for a while and stop at line 101.
    • Teardown: Finish debugging session
  4. Step Into - start debugging
    1. Invoke Step Into action from menu or toolbar
    • EXPECTED RESULT: Debugger will be started and stop on the first line of main method.
    • Teardown: Finish debugging session
  5. Step Into
    1. Open file MemoryView.java in editor
    2. Place your caret at line 58
    3. Invoke Toggle Line Breakpoint breakpoint from editor's popup menu
    4. Invoke Debug Project action from menu or toolbar
    5. Wait till debugger stops at line 58
    6. Invoke Step Into action
    • EXPECTED RESULT: Debugger will stop at line 86.
    • Teardown: Finish debugging session
  6. Step Over
    1. Invoke Debug Project action from menu or toolbar
    2. Wait till debugger stops at line 58
    3. Invoke Step Over action
    • EXPECTED RESULT: Debugger will stop at line 60.
    • Teardown: Finish debugging session and delete all breakpoints
  7. Step Over Expression
    1. Toggle line breakpoint at line 101
    2. Invoke Debug Project action from menu or toolbar
    3. Wait till debugger stops at line 101
    4. Invoke Step Over Expression action five times
    • EXPECTED RESULT: Debugger will step on all methods of the expression
    • Teardown: Finish debugging session and delete all breakpoints
  8. Step Out
    1. Toggle line breakpoint at line 58
    2. Invoke Debug Project action from menu or toolbar
    3. Wait till debugger stops at line 58
    4. Invoke Step Into action
    5. Wait till debugger stops at line 86
    6. Invoke Step Out action
    • EXPECTED RESULT: Debugger will stop at line 60.
    • Teardown: Finish debugging session and remove breakpoint
  9. Run Into Method
    1. Toggle line breakpoint at line 53
    2. Invoke Debug Project action from menu or toolbar
    3. Wait till debugger stops at line 53
    4. Place your caret at line 62 between 17th and 29st character (text updateStatus)
    5. Invoke Run Into Method action from editor popup menu
    • EXPECTED RESULT: The application will run for a second and after that debugger will stop at line 86.
    • Teardown: Finish debugging session and remove breakpoint
  10. Step Over Expression - Arguments
    1. Toggle line breakpoint at line 99
    2. Invoke Debug Project action
    3. Wait till debugger stops at line 99 and invoke Step Over action
    4. Invoke Step Over Expression action
    • EXPECTED RESULT: Debugger will stop at line 102, constructor Long is selected by a green colour. Variables view contains Before call to '<init>' with subnode Arguments which contains subnode total. The icon next to Before call to '<init>' and Arguments nodes is a smaller version of the icon on Step Over Expression button in the Debug toolbar.
  11. Step Over Expression - Return Values
    1. Invoke Step Over Expression action
    • EXPECTED RESULT: Debugger will stop at line 103, constructor Long is selected by a green color. Variables view contains Before call to '<init>' node with subnodes Arguments and Return values history. Arguments node contains subnode free and node Return values history contains return <init>() subnode. The icon next to Before call to '<init>' and Arguments nodes is a smaller version of the icon on Step Over Expression button in the Debug toolbar. Return values history and its subnodes have an icon with a grey rectangle and a grey triangle. The Type column is empty and the Value column shows null. The constructor from previous test case is underlined.
  12. Step Over Expression - Arguments 2
    1. Invoke Step Over Expression action 2 times
    • EXPECTED RESULT: Debugger will stop at line 101, method format is selected by a green colour. Variables view contains Before call to format node with subnodes Arguments and Return values history. Arguments node contains a subnode new Object[[ | ]]{new Long(total),new Long(free),new Integer(taken)} containing 3 subnodes of all array items. The Return values history node contains 3 return <init>() subnodes. The icon next to Before call to 'format' and Arguments nodes is a smaller version of the icon on Step Over Expression button in the Debug toolbar. Return values history and its subnodes have an icon with a grey rectangle and a grey triangle. All constructors in the expression are underlined.
  13. Step Over Expression - Return Values 2
    1. Invoke Step Over Expression action again
    • EXPECTED RESULT: Debugger will stop at line 101, method setText is selected by a green colour. Variables view contains Before call to setText() node with subnodes Arguments and Return values history. Arguments node contains a node msgMemory.format(new Object[[ | ]]{new Long(total),new Long(free),new Integer(taken)}) of String type. Node Return values history contains 3 return <init>() subnodes and String node return format(). The icon next to Before call to 'setText()' and Arguments nodes is a smaller version of the icon on Step Over Expression button in the Debug toolbar. Return values history and its subnodes have an icon with a grey rectangle and a grey triangle. All constructors in the expression are underlined.
    • Teardown: Finish debugger session, delete all breakpoints


Test suite: Apply Code Changes

Purpose: To verify a Fix and Continue functionality
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open file FixAndContinue.java in editor.

  1. Change method I
    1. Toggle line breakpoint at line 25 of the file FixAndContinue.java
    2. Invoke Debug File action form context menu of file in Projects view
    3. Invoke Step Over
    4. Change method call at line 30 to afterFix();
    5. Invoke Apply Code Changes
    6. Invoke Step Over
    • EXPECTED RESULT: In output will be two messages: Before code changes followed by After code changes
    • Teardown: Finish debugging session Change method call at line 30 to beforeFix(); Remove breakpoint from line 25


Test suite: Variables view

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

  1. Variables
    1. Put caret at line 91
    2. Invoke Run To Cursor action
    • EXPECTED RESULT: Debugger will stop at line 91. Variables view will contain nodes this, r, free, total. Nodes this and r should be expandable.
    • Teardown: Finish debugging session
  2. Member variables
    • Setup: Proceed steps from Variables testcase
    1. Expand node this
    • EXPECTED RESULT: Variables view will contain node timer, Static, Inherited and other nodes under node this. Ensure node this is not under node this again.
    • Teardown: Finish debugging session
  3. Static variables
    • Setup: Proceed steps from Member Variables testcase
    1. Expand node Static
    • EXPECTED RESULT: Nodes msgMemory, bundle and other nodes will be under node Static. Ensure node Static is not under node Static again.
    • Teardown: Finish debugging session
  4. Inherited variables
    • Setup: Proceed steps from Member Variables testcase
    1. Expand node Inherited
    • EXPECTED RESULT: Nodes of variables from javax.swing.JFrame will be under node Inherited. Ensure node Inherited is not under node Inherited again.
    • Teardown: Finish debugging session
  5. Go to source
    • Setup: Proceed steps from Member Variables testcase
    1. Close file MemoryView.java in editor
    2. Select node jPanel1 and invoke Go To Source from its context menu
    • EXPECTED RESULT: File MemoryView.java will be opened in editor. Caret will be at line 223.
    • Teardown: Finish debugging session
  6. Create fixed watch
    • Setup: Proceed steps from Member Variables testcase
    1. Select node r and invoke Create Fixed Watch from its context menu
    • EXPECTED RESULT: Node r will be in Watches view (or duplicated with watch icon when watches are shown in the Variables view). Value of the node in watches view will be the same as in the Variables view.
    • Teardown: Finish debugging session


Test suite: Breakpoints view

Purpose: Verifies Breakpoints window functionality
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. Add line breakpoint
    1. Toggle line breakpoint at line 91
    • EXPECTED RESULT: Breakpoint with name Line MemoryView.java:91 will be created. Icon of the breakpoint will be red square.
    • Teardown: Delete breakpoint
  2. Remove line breakpoint
    • Setup: Proceed steps from Add line breakpoint testcase
    1. Toggle line breakpoint at line 91
    • EXPECTED RESULT: Breakpoint will be removed from breakpoints view.
  3. Add method breakpoint
    1. Put caret at line 95
    2. Invoke action Debug > New Breakpoint from menu
    3. In New Breakpoint dialog set Breakpoint Type to Method and press OK
    • EXPECTED RESULT: Breakpoint with name Method MemoryView:updateStatus will be created. Icon of the breakpoint will be red triangle.
  4. Customize breakpoint
    • Setup: Proceed steps from Add method breakpoint testcase
    1. Invoke Properties action from the pop-up menu of the breakpoint node
    • EXPECTED RESULT: The Breakpoint Properties dialog must be shown
    • Teardown: Delete breakpoint
  5. Disable breakpoint
    1. Toggle line breakpoint at line 91
    2. Uncheck enabled property of breakpoint Line MemoryView.java:91 in Breakpoints view
    3. Invoke Debug Project action
    • EXPECTED RESULT: Application will be started and will not stop on the breakpoint.
    • Teardown: Finish debugging session and delete breakpoint
  6. Disable all breakpoints
    1. Open MemoryView.java in source editor
    2. Toggle several breakpoints in editor gutter
    3. Create several non-line breakpoints - Debug > New Breakpoint ...
    4. Invoke Disable All action from the pop-up menu of the Breakpoints window pane
    • EXPECTED RESULT: All breakpoints must have Enabled property set to "False".
  7. Enable all breakpoints
    1. Invoke Enable All action from the pop-up menu of the Breakpoints window pane
    • EXPECTED RESULT: All breakpoints must have Enabled property set to "True".
  8. Remove all breakpoints
    1. Select any breakpoint from Breakpoints view and invoke Delete All action from its context menu
    • EXPECTED RESULT: All breakpoints will be removed from breakpoints view.
  9. Breakpoint highlighting
    1. Toggle line breakpoint at line 91 and 107
    2. Invoke Debug Project action
    3. When debugger stops at line 91, invoke Continue action
    • EXPECTED RESULT: Breakpoint Line MemoryView.java:91 is diplayed in plain text. Breakpoint Line MemoryView.java:107 is displayed in bold text.
    • Teardown: Finish debugging session and delete all breakpoints


Test suite: Watches view

Purpose: Verifies Watches view functionality
Important: Do this test suite with standalone Watches view as well as when it is integrated in the Variables view!! Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open file MemoryView.java in editor. Open Watches view.

  1. Add simple watch
    1. Invoke Debug > New Watch ... menu
    2. Enter name of the watch taken
    • EXPECTED RESULT: Watches view will show node with name taken. Other columns of the view will be empty.
  2. Add watch expression I
    1. Invoke Debug > New Watch ... menu
    2. Enter name of the watch System.getProperty("java.version")
    • EXPECTED RESULT: Watches view will show node with name System.getProperty("java.version"). Other columns of the view will be empty. Make sure code completion works!
  3. Add watch expression II
    1. Invoke New Watch from watches view context menu
    2. Enter name of the watch System.getProperty("java.version")
    • EXPECTED RESULT: Watches view will show node with name System.getProperty("java.version"). Other columns of the view will be empty. Make sure code completion works and New Watch dialog is the same as in testcase Add Watch Expression I!
  4. Add watch expression III
    1. Create a new watch System.getProperty("java.version") by typing into the Enter New Watch row in the Watches/Variables view and pressing enter
    • EXPECTED RESULT: Watches view will show node with name System.getProperty("java.version"). Other columns of the view will be empty.
  5. Add object watch
    1. Invoke Debug > New Watch ... menu
    2. Enter name of the watch bundle
    • EXPECTED RESULT: Watches view will show node with name bundle. Other columns of the view will be empty.
  6. Watches functionality
    1. Put caret at line 101
    2. Invoke Run to Cursor action
    • EXPECTED RESULT: Watches view will show nodes with names taken, System.getProperty("java.version") and bundle with types int, String and PropertyResourceBundle. Value and toString() will show values of the first two watches and both columns will show the same value. Value for bundle will be its instance number. The third node will be expandable and it will contain nodes Static, Inherited, lookup.
    • Teardown: Finish debugging session
  7. Create fixed watch I
    1. Create watch free
    2. Toggle line breakpoint at line 101
    3. Invoke Debug Project action
    4. Create new watch new Long(free)
    5. Invoke Create Fixed Watch action from pop-up menu
    6. Invoke Debug > Continue action
    • EXPECTED RESULT: Debugger will hit the breakpoint again. Fixed watch will display same value, the normal watch will change value.
    • Teardown: Finish debugging session, delete breakpoint and watches


Test suite: New watch dialog

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

  1. Dialog from Watches view
    1. Invoke Window > Debugging > Watches menu
    2. Invoke New Watch... from context menu of Watches view
    • EXPECTED RESULT: New Watch dialog will be shown. Ensure its design is the same as the design of previous dialogs.
    • Teardown: Close dialog
  2. Dialog with code completion
    1. Toggle line breakpoint at line 101
    2. Invoke Debug Project menu
    3. Invoke New Watch from context menu of Watches view
    • EXPECTED RESULT: New Watch dialog will be shown. The dialog will have code completion in its Watch Expression field.
  3. Code completion context I
    1. Write text String. into expression field
    2. If code completion is not opened automatically, press Ctrl+Space
    • EXPECTED RESULT: Code completion with static member and static methods of class String will be opened.
    • Teardown: Cancel code completion and delete written string
  4. Code completion context II
    1. Press Ctrl+Space
    2. Cancel code completion
    3. Write text this. into expression field
    4. If code completion is not opened automatically, press Ctrl+Space
    • EXPECTED RESULT: In the first case the completion list should start with free, r, taken and total. After this point to wait(timeout, nanos) both cases will be the same. The second case will end here and the first will continue showing items starting with assert, boolean, ...


Test suite: Threads view (Multithread)

Purpose: Verifies Thread View functionality
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open Threads view.

  1. Switch to thread
    1. Toggle line breakpoint at line 106 of file MemoryView.java
    2. Open breakpoint properties and select Suspend -> All Threads
    3. Invoke Debug Project action
    4. Debugger should stop on the breakpoint after a while
    5. Select node TimerQueue in the Threads view
    6. Invoke Make Current action from context menu of this node
    • EXPECTED RESULT: Call Stack view will show information about TimerQueue thread.
    • Teardown: Finish debugging session and delete the breakpoint
  2. Suspend thread
    1. Invoke Debug Project action
    2. Select node TimerQueue in the Threads view
    3. Change Suspended property of this node to true using popup menu for thread node or checkbox in Suspended column. (Use customize view button and enable this column.)
    • EXPECTED RESULT: Progress bar of the MemoryView will freeze, but GUI will react to user actions (ensure Refresh Now, Garbage Collect and Close buttons are working)
    • Teardown: Finish debugging session
  3. Resume thread
    • Setup: Proceed steps from Suspend Thread testcase
    1. Set refresh time in the MemoryView application to 100 and click Apply
    2. Change suspended property of TimerQueue node to false
    • EXPECTED RESULT: Progress bar of the MemoryView will be moving again (10 times faster than before).
    • Teardown: Finish debugging session
  4. Go to source
    1. Toggle line breakpoint at line 106 of MemoryView.java
    2. Invoke Debug Project action
    3. Debugger will stop on the breakpoint after a while
    4. Close file in source editor
    5. Select node system | main | main in the Threads view
    6. Invoke Go To Source action from context menu of this node
    • EXPECTED RESULT: Source editor will be opened with file MemoryView.java and caret should be at line 106.
    • Teardown: Finish debugging session and delete the breakpoint
  5. Interrupt thread
    1. Toggle line breakpoints at lines 39 and 59 of DeadlockTest.java
    2. Start debugging by Debug File action on the file
    3. Wait until debugger reaches the first breakpoint, press Step Over multiple times until debugger reaches line 44 (synchronized(mutex2))
    4. Press Step Over once more
    • EXPECTED RESULT: Debugger will act as suspended, Debugging view will contain the information Step is blocked by suspended thread 'Thread-1'. Resume this thread to proceed? and New Breakpoint Hit with option to move to that breakpoint. .
  6. Interrupt thread - Resume
    • Setup: Continue with previous test case
    1. Press Resume button in Debugging view.
    • EXPECTED RESULT: Program will be running but both threads will show state On Monitor in the Threads view. Synchronization probably didn't occur. Therefore no action will be visible.
  7. Interrupt thread - Go to Breakpoint
    • Setup: Stop debugging session. Leave breakpoints on the same lines (39, 59)
    1. Invoke Debug File action
    2. Wait until debugger stops at line 39 and a New Breakpoint Hit information appears in debugging window.
    3. Press the arrow at mentioned information
    • EXPECTED RESULT: Debugger will jump to line 59 and continue debugging of method Thread2.run().


Test suite: Line breakpoints (Multithread)

Purpose: Verifies line breakpoint functionality
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project. Open Breakpoints view.

  1. Suspend debugging - all threads
    1. Open file ThreadSuspending.java in editor
    2. Toggle line breakpoint at line 39
    3. Select corresponding breakpoint in the Breakpoints view
    4. Invoke Properties from context menu and change Suspend property of this breakpoint to All threads
    5. Invoke Debug File action from context menu of the file in Projects explorer
    • EXPECTED RESULT: Debugger will start and will hit the breakpoint. In output window some output from Thread-1 (less than 100) and no output from Thread-2 will be displayed.
    • Teardown: Finish debugging session
  2. Suspend debugging - current thread
    1. Select the breakpoint in the Breakpoints view
    2. Invoke Properties from context menu and change Suspend property of this breakpoint to Breakpoint thread
    3. Invoke Debug File action from context menu of the file in Projects explorer
    • EXPECTED RESULT: Debugger will start and will hit the breakpoint. There will be only output from Thread-1 (no output from Thread-2 at all). The first lines of the output will read Thread-1: 1 and (after the breakpoint is hit) Thread-1: 2. Thread-1 keeps outputting this message (running).
    • Teardown: Finish debugging session
  3. Suspend debugging - no threads
    1. Select the breakpoint in the Breakpoints view
    2. Invoke Properties from context menu and change Suspend property of this breakpoint to No thread (continue)
    3. Invoke Debug File action from context menu of the file in Projects explorer
    • EXPECTED RESULT: Debugger will start and will not hit the breakpoint. Both Thread-1 and Thread-2 will output messages with increasing counter. There will be messages about breakpoint hit in Debugger Console.
    • Teardown: Delete the breakpoint
  4. Go To Source
    1. Open file MemoryView.java in editor
    2. Toggle line breakpoint at line 96
    3. Close source in editor
    4. Select corresponding breakpoint in the Breakpoints view
    5. Invoke Go to Source action from the context menu of this node
    • EXPECTED RESULT: Source Editor should be opened with file MemoryView.java with caret at line 96
    • Teardown: Remove breakpoint



Test suite: Sessions view (Multithread)

Purpose: Verifies Sessions view functionality
Setup: Start NetBeans IDE with clear userdir. Open Sessions view.

  1. Debug all threads
    1. Open ThreadSuspending.java file
    2. Place line breakpoint at line 39
    3. Invoke properties on the breakpoint and change Suspend property to All threads
    4. Start debugging by Debug File action
    5. Wait until the breakpoint is hit, go to Sessions view, select current tests.ThreadSuspending session and invoke Scope | Debug All Threads from its popup menu
    6. Invoke Step Over action a few times
    • EXPECTED RESULT: Debugged application will start with a few logs from Thread-1. After the session settings and Step Over actions there will be mixed logs from Thread-1 and Thread-2 in output window.
  2. Debug current thread
    1. Continue with previous testcase (Debug all threads)
    2. Select the current session in Sessions view and invoke its popup menu
    3. Select Scope | Debug Current Thread
    4. Invoke Step Over action a few times
    • EXPECTED RESULT: There will be only logs from Thread-2 after this set of Step Over actions.
    • Teardown: Finish debugging session and remove breakpoint
  3. View Session Languages
    • Setup: Open JSPExamples Project. Make sure Glassfish v2 or v3 is installed and working properly.
    1. Open Projects Tab
    2. Toggle breakpoint at line 25 in date.jsp. (WebPages -> dates -> date.jsp)
    3. Toggle breakpoint at line 27 in JspCalendar.java (SourcePackages -> dates -> JspCalendar.java)
    4. Invoke Clean and Build from popup menu of the JSPExamples project.
    5. Invoke Debug on the JSPExamples project or press Ctrl + F5.
    • EXPECTED RESULT: A JSP Examples web page should open in your default browser.
    1. Find JSP 1.2 Examples section and click Execute link in the Date row
    2. Execution should stop at line 27 of JspCalendar.java
    3. Invoke Debug > Continue from main menu or press F5
    4. Execution should stop at line 25 of date.jsp
    5. Choose Language -> Java from session context menu.
    • EXPECTED RESULT: Debugging view should stay the same after language change. There should be Java Language set at JSPExamples Session in Sessions View. Local Variables View should change and show local Java variables not JSPVariables such as Request, Session, Context Attributes and Implicit Objects.
    1. Choose Language -> JSP in session view at particular row using Select Box.
    • EXPECTED RESULT: Debugging view should stay the same after language change. There should be JSP Language set at JSPExamples Session in Sessions View. Local Variables View should change and show local JSP variables only.
    • Teardown: Close all debugger sessions.


Test suite: Resume/Suspend threads. (Multithread)

Purpose: Verifies the functionality of threads table buttons

Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project.

  1. Suspend running thread
    1. Make sure that Debugging view is opened.
    2. Select ThreadSuspending1.java, invoke Debug File popup menu action and switch to Debugging view.
    3. Make sure that Show suspend/resume table button is turned on and Show system threads button is turned off.
    4. 3 threads should be running.
    5. Select Thread-1, invoke Make Current from its popup menu and push Suspend thread Thread-1 button.
    • EXPECTED RESULT: Thread-1 should be suspended. This thread also should be marked as Current Thread by green bar in the left. Its title should be changed to Thread-1 suspended at Thread.sleep. Appropriate node for this thread should be expandable (+). There should be shown thread frame where the thread was suspended. The Debugger Console tab of Output view prints Thread Thread-1 stopped at Thread.java.sleep. The left icon of the node should be orange. The button for this thread should change to Resume thread Thread-1
  2. Resume suspended thread
    1. Make sure that Debugging view is opened.
    2. Make sure that Show suspend/resume table button is turned on and Show system threads button is off.
    3. Push Resume thread Thread-1 button next to Thread-1 suspended at Thread.sleep text in Debugging view.
    • EXPECTED RESULT: Thread-1 should be running. The Debugger Console tab of Output view prints User program running. Its title should be changed back to Thread-1. Now the left icon of the node should be green. The button for this thread should change to Suspend thread Thread-1
  3. Suspend running thread - popup menu
    1. Make sure that Debugging view is opened.
    2. Switch to Debugging view.
    3. 3 threads should be running.
    4. Select Thread-1 thread and invoke Suspend popup menu action. (Make Current item has to be disabled and Suspend and Interrupt items have to be enabled)
    • EXPECTED RESULT: Thread-1 should be suspended. This thread also should be marked as Current Thread by green bar in the left. Its title should be changed to Thread-1 suspended at Thread.sleep. Appropriate node for this thread should expandable (+). There should be shown thread frame where the thread was suspended. The Debugger Console tab of Output view prints Thread Thread-1 stopped at Thread.java.sleep. The left icon of the node should be orange. The button for this thread should change to Resume thread Thread-1
  4. Resume suspended thread - popup menu
    1. Make sure that Debugging view is opened.
    2. Select suspended Thread-1 suspended at Thread.sleep in Debugging view and invoke Resume popup menu action. (Make Current and Interrupt items have to be disabled)
    • EXPECTED RESULT: Thread-1 should be running. The Debugger Console tab of Output view prints User program running. Its title should be changed back to Thread-1. Now the left icon of the node should be green. The button for this thread should change to Suspend thread Thread-1
  5. Multiple selection
    1. Select more than 1 thread and invoke popup menu.
    • EXPECTED RESULT: For threads in running state there should be Interrupt and Suspend actions enabled. For threads in suspended state there should be Resume action enabled only. For threads in different states (suspended and running) all actions should be disabled.
  6. Set Current Thread
    1. Suspend all threads
    2. Invoke Make Current from popup menu of Thread 3
    3. Invoke Debug > Set Current Thread from main menu
    4. Choose Thread 2
    5. Confirm by Enter
    • EXPECTED RESULT: Thread should be highlighted and set as current.
    • Teardown: Stop debugged application - invoke Debug > Finish Debugger Session from main menu.


Test suite: Debugging application (Multithread)

Purpose: Verifies breakpoints usage
Setup: Start NetBeans IDE with clear userdir. Open project MemoryView and set it as main project.

  1. Stopping at breakpoints
    1. Open ThreadSuspending1.java file and put breakpoints to 28, 47, and 63 lines (line contains i++;)
    2. Invoke Debug File popup menu action and switch to Debugging view.
    • EXPECTED RESULT: In a moment Thread-1, Thread-2 and Thread-3 should be suspended annotated with orange icon with red rectangle. For each application thread there should be Resume thread Thread-x button available. Thread-1 has to be marked as Current Thread by green bar. Thread-2 and Thread-3 have to be suspended - yellow bar. Application threads must be expandable (+). Ensure that each thread was suspended on appropriate line as defined in step 1. In the bottom of Debugging view another panel should appear. Verify that New Breakpoint Hits (2) and bold arrow are present in the bottom of Debugging view. Scroll down BOLD ARROW: Thread-2 at line breakpoint ThreadSuspending1.java:47 and Thread-3 at line breakpoint ThreadSuspending1.java:63 have should be there. Debugger Console of Output should read:
      • Listening on <portnumber>
      • User program running
      • LineBreakpoint ThreadSuspending1.java : 28 successfully submitted.
      • LineBreakpoint ThreadSuspending1.java : 47 successfully submitted.
      • LineBreakpoint ThreadSuspending1.java : 63 successfully submitted.
      • Breakpoint hit at line 28 in class tests.ThreadSuspending1$1 by thread Thread-1.
      • Thread Thread-1 stopped at ThreadSuspending1.java:28.
      • Breakpoint hit at line 47 in class tests.ThreadSuspending1$2 by thread Thread-2.
      • Breakpoint hit at line 63 in class tests.ThreadSuspending1$3 by thread Thread-3.
  2. Resuming threads
    1. Switch to Debugging view
    2. Select all application threads. (Thread-1, Thread-2 and Thread-3) and invoke Resume popup menu action.
    • EXPECTED RESULT: Application threads should be resumed and suspended afterwards immediately.
  3. Change Current Thread
    1. Switch to Debugging view and select non current thread which encountered breakpoint.
    2. Invoke Make Current popup menu action.
    • EXPECTED RESULT: This thread should be marked as current with green bar, highlighted breakpoint (green line in editor) belongs to current thread now. New Breakpoint Hits decreases by 1.
  4. Change Current Thread II
    1. Switch to Debugging view
    2. Double click non current suspended thread - it is current thread now.
    3. Text of current thread name should be bold.
    4. Expand current thread node.
    • EXPECTED RESULT: This thread should be marked as current (method of suspended thread is printed in BOLD only, collapsing thread node should make thread's name bold again) with green bar, highlighted breakpoint (green line in the editor) belongs to current thread now. New Breakpoint Hits decreases by 1.
    • Teardown: Stop debugged application - invoke Debug > Finish Debugger Session from main menu.
  5. Current Thread Chooser
    1. Invoke Debug File popup menu action.
    2. In a while all application threads should be suspended.
    3. Invoke Debug > Set Current Thread from main menu.
    • EXPECTED RESULT: Verify the functionality of choosing current thread. Chosen thread should be always indicated in Debugging view by green bar next to it.
    • Teardown: Stop debugged application - invoke Debug > Finish Debugger Session from main menu.
  6. Monitors
    1. Edit ThreadSuspending1.java. Surround i++; line with synchronized (this) {} and make sure that breakpoints are set for lines increasing variable i
    2. Invoke Debug File popup menu action.
    3. In a while all application threads should be suspended.
    4. Push Show monitors button from the toolbar of Debugging view.
    • EXPECTED RESULT: Monitors for each thread should be shown for appropriate line in thread frame of Debugging view.
    • Teardown: Stop debugged application - invoke Debug > Finish Debugger Session from main menu.
  7. Deadlock detection
    1. Right click DeadlockTest.java file and invoke Debug File popup menu action.
    2. Invoke debugging view's context menu.
    3. Select Check for Deadlock option.
    • EXPECTED RESULT: Above the Debugging view toolbar there should appear yellow panel with Deadlock detected label.
    • Teardown: Stop debugged application - invoke Debug > Finish Debugger Session from main menu.


Test suite: Operations (Ant)

Purpose:
Setup: Start NetBeans with clean userdir. Open/create sample project AnagramGame. Switch to Files view.

  1. Start debugging
    1. Select node build.xml and invoke from its context menu Debug Target > run
    • EXPECTED RESULT: Debugger stops at line 35 of build.xml opened in editor. Variables, Watches and Call Stack debugger views are opened. Output contains two tabs: anagrams (run) and build.xml
    • Teardown: Finish debugging session
  2. Finish debugging
    • Setup: Perform steps from Start debugging case
    1. Invoke Debug > Finish Debugging Session from main menu
    • EXPECTED RESULT: Program counter is not displayed any more. Debugger toolbar is closed. Target run is not executed (check messages in ant-debugger-tests output). Debugger views are closed
  3. Step over
    • Setup: Perform steps from Start debugging case
    1. Invoke action Step Over two times
    • EXPECTED RESULT: Program counter is at line 710 in build-impl.xml at the beginning of EXECUTION SECTION.
    • Teardown: Finish debugging session
  4. Step into
    • Setup: Perform steps from Start debugging case
    1. Invoke action Step Over 4 times
    2. Invoke action Step Into
    • EXPECTED RESULT: Program counter is at line 711. Whole target "j2seproject1:java" node has green background. Call stack view displays nodes j2seproject1.java and run
    • Teardown: Finish debugging session
  5. Step out
    • Setup: Perform steps from Start debugging case
    1. Invoke action Step Into 8 times
    • EXPECTED RESULT: Program counter is at line 41. Target -init-private is executed. Program counter is on first property line.
    1. Invoke action Step Out 5 times
    • EXPECTED RESULT: Program counter is at line 710 inside build-impl.xml and whole target run has green background.
    • Teardown: Finish debugging session


Test suite: Breakpoints (Ant)

Purpose:
Setup: Start NetBeans with clean userdir. Open/create sample project AnagramGame. Switch to Files view and open build.xml file.

  1. Toggle breakpoint
    1. Toggle breakpoint at line 36
    • EXPECTED RESULT: Line 36 is highlighted with red background and red square in gutter
    • Teardown: Remove breakpoint
  2. Breakpoint functionality
    • Setup: Perform step from Toggle breakpoint case
    1. Select node build.xml and invoke from its context menu Debug Target > run
    2. Invoke Continue action
    • EXPECTED RESULT: Program counter is at line 36. The line is highlighted with green background and red square with green arrow in gutter
    • Teardown: Finish debugger and remove breakpoint
  3. Continue after breakpoint
    • Setup: Perform steps from Breakpoint functionality case
    1. Invoke Continue action
    • EXPECTED RESULT: Rest of target run is executed without stopping.
    • Teardown: Remove breakpoint
  4. Finish debugger does not stop on breakpoint
    • Setup: Perform step from Toggle breakpoint case
    1. Select node build.xml and invoke from its context menu Debug Target > run
    2. Invoke Finish Debugger Session action
    • EXPECTED RESULT: Program counter is not displayed any more. Target run is not executed (check messages in ant-debugger-test output). Debugger views are closed.
    • Teardown: Remove breakpoint
  5. Disable breakpoint
    • Setup: Perform step from Toggle breakpoint case
    1. Invoke Window > Debugging > Breakpoints action
    2. In Breakpoints view select breakpoint build.xml:36 and invoke Disable from its context menu
    3. Select node build.xml and invoke from its context menu Debug Target > run
    4. Invoke Continue action
    • EXPECTED RESULT: Program counter is not displayed any more. Target run is fully executed without stopping (check messages in output window).
    • Teardown: Remove breakpoint


Test suite: Watches & Local Variables (Ant)

Purpose:
Setup: Start NetBeans with clean userdir. Open/create sample project AnagramGame. Switch to Files view.

  1. Stop on watch
    1. On line 34 inside build.xml file select text name
    2. Invoke action New Watch from editor context menu, modify text to "ant.project.name" and press OK in New Watch dialog
    3. Select node build.xml and invoke from its context menu Debug Target > run
    • EXPECTED RESULT: Program counter is at line 35. Watches view shows watch ant.project.name with value anagrams
    • Teardown: Finish debugging session and delete watch
  2. Local variables
    1. Select node build.xml and invoke from its context menu Debug Target > run
    2. Invoke Window > Debugging > Variables from main menu
    • EXPECTED RESULT: Variables lists all properties set for the build script. List contains ant.project.name with value anagrams
    • Teardown: Finish debugging session


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