Start NetBeans with clean userdir. Open/create sample project AnagramGame. Switch to Files view.
Menu items on build XML file
Select file build.xml and invoke its context menu
EXPECTED RESULT: The menu contains item Debug target with submenus
default
clean
compile
debug
jar
javadoc
run
test
test-single
Other Targets >
Advanced...
Menu items on other XML file
Expand node nbproject
Select node project.xml and invoke its context menu
EXPECTED RESULT: The menu does not contain item Debug target
Test suite: Operations
Setup:
Start NetBeans with clean userdir. Open files build.xml and build-impl.xml. Open Favorites view and mount folder, where the files are located.
Start debugging
Select node build.xml and invoke from its contex menu Debug Target | run
EXPECTED RESULT: Debugger stops on line 5 of build.xml opened in editor. Local Variables, Watches and Call Stack debugger views are opened. Output contains two tabs: ant-debugger-tests (run) and build.xml
Teardown:
Finish debugging session
Finish debugging
Setup:
Perform steps from Start debugging case
Finish debugging session
EXPECTED RESULT: Program counter is not displayed any more. Debugger toobar and is closed. Target run is not executed (check messages in ant-debugger-tests output). Debugger views are closed
Step over
Setup:
Perform steps from Start debugging case
Invoke action Step Over two times
EXPECTED RESULT: Target -pre-run is exceuted without stopping. Program counter is on line 11 and whole target run has green background.
Teardown:
Finish debugging session
Step into
Setup:
Perform steps from Start debugging case
Invoke action Step Over
Invoke action Step Into
EXPECTED RESULT: Program conter is on line 15. Whole target -pre-init has green background. Call stack view displays nodes -pre-run and run
Teardown:
Finish debugging session
Step out
Setup:
Perform steps from Start debugging case
Invoke action Step Over
Invoke action Step Into
Invoke action Step Out
EXPECTED RESULT: Target -pre-run is exceuted. Program counter is on line 11 and whole target run has green background.
Teardown:
Finish debugging session
Test suite: Breakpoints
Setup:
Start NetBeans with clean userdir. Open file build.xml. Open Favorites view and mount folder, where the file is located.
Toggle breakpoint
Toggle breakpoint on line 12
EXPECTED RESULT: Line 12 is highlighted with red background and red square in guter
Teardown:
Remove breakpoint
Breakpoint functionality
Setup:
Perform step from Toggle breakpoint case
Select node build.xml and invoke from its contex menu Debug Target|Other Targets|run
Invoke Continue action
EXPECTED RESULT: Program counter is on line 12. The line is highlighted with green background and red square with green arrow in guter
Teardown:
Finish debugger and remove breakpoint
Continue after breakpoint
Setup:
Perform steps from Breapkoint functionality case
Invoke Continue action
EXPECTED RESULT: Rest of target run is executed without stopping. Debugger views are closed
Teardown:
Remove breakpoint
Finish debugger does not stop on breakpoint
Setup:
Perform step from Toggle breakpoint case
Select node build.xml and invoke from its contex menu Debug Target|Other Targets|run
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
Dissable breakpoint
Setup:
Perform step from Toggle breakpoint case
Invoke Window|Debugging|Breakpoints action
In Breakpoints view select breakpoint build.xml:11 and invoke Disable from its context menu
Select node build.xml and invoke from its contex menu Debug Target|Other Targets|run
Invoke Continue action
EXPECTED RESULT: Program counter is not displayed any more. Target run is fully executed without stopping (check messages in ant-debugger-test output). Debugger views are closed
Teardown:
Remove breakpoint
Test suite: Watches
Setup:
Start NetBeans with clean userdir. Open file build.xml. Open Favorites view and mount folder, where the file is located.
New watch from editor
Invoke action New Watch from contex menu in editor area
Write name of watch hello and press OK
EXPECTED RESULT: Watch with name hello is created and displayed in Watches view.
Teardown:
Delete watch
New watch from view
Invoke action New Watch from contex menu in Watches view
Write name of watch hello and press OK
EXPECTED RESULT: Watch with name hello is created and displayed in Watches view.
Teardown:
Delete watch
Stop on watch
On line 17 select text build.testproperty
Invoke action New Watch from editor context menu and press OK in New Watch dialog
Select node build.xml and invoke from its contex menu Debug Target|Other Targets|run
Invoke Continue action
EXPECTED RESULT: Program counter is on line 11. Watches view shows watch build.testproperty with value true
Teardown:
Finish debugging session and delete watch
Local variables
Select node build.xml and invoke from its contex menu Debug Target|Other Targets|run
Invoke Step Over action
Invoke Window|Debugging|Local Variables from main menu
EXPECTED RESULT: Local Variables lists all properties set for the build script. After invoke of Step Over again, the view lists also property build.testproperty amongst them
Teardown:
Finish debugging session
Test suite: Highlighting
Setup:
Start NetBeans with clean userdir. Open file build.xml. Open Favorites view and mount folder, where the file is located.
Program counter - line
Select node build.xml and invoke from its contex menu Debug Target|all
EXPECTED RESULT: Line 5 is highlighted with green background and green arrow in guter
Teardown:
Finish debugger
Program counter - dependent target
Select node build.xml and invoke from its contex menu Debug Target|Other Targets|run
Invoe Step Over action
EXPECTED RESULT: Only text -pre-run on line 11 is highlighted green. On line 11 is green arrow in guter
Teardown:
Finish debugger
Program counter - target
Setup:
Perform step from Program counter - line case
Invoe Step Over action
EXPECTED RESULT: Whole target all is highlighted green. On line 7 is green arrow in guter
Teardown:
Finish debugger
Breakpoint
Togle breakpoint on line 12
EXPECTED RESULT: Line 12 is highlighted with red background and red square in guter
Teardown:
Remove breakpoint
Disabled breakpoint
Setup:
Perform step from Breakpoint case
Invoke Window|Debugging|Breakpoints action
In Breakpoints view select breakpoint build.xml:11 and invoke Disable from its context menu
EXPECTED RESULT: Line 12 is highlighted with gray background and gray square in guter