TS 60 ANTdbg

Ant debugger Test Specification for NetBeans 6.0

Author: Lubomir Cincura, Emanuel Hucka, Jiri Vagner
Version: 1.2
Lastupdate: 2008/03/14
Introduction: This is full test specification of NetBeans Ant Debugger.

Contents

Test suite: Menu items

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

  1. Menu items on build XML file
    1. 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...
  1. Menu items on other XML file
    1. Expand node nbproject
    2. Select node project.xml and invoke its context menu
    • EXPECTED RESULT: The menu does not contain item Debug target


Test suite: Operations

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 contex menu Debug Target | run
    • EXPECTED RESULT: Debugger stops on line 35 of build.xml opened in editor. Local Variables, Watches and Call Stack debugger views are opened. Output contains two tabs: anagram (run) and build.xml
    • Teardown: Finish debugging session
  2. Finish debugging
    • Setup: Perform steps from Start debugging case
    1. Finish debugging session
    • 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 on line 429 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 on line 430. Whole target "j2seproject1" node has green background. Call stack view displays nodes j2seproject1 and run
    • Teardown: Finish debugging session
  5. Step out
    • Setup: Perform steps from Start debugging case, but invoke Debug target > clean
    1. Invoke action Step Into 7 times
    • EXPECTED RESULT: Target -init-private is executed. Program counter is on first property line.
    1. Invoke action Step Out
    • EXPECTED RESULT: Target init is selected. Program counter is on line 320 inside build-impl.xml and whole target run has green background.
    • Teardown: Finish debugging session


Test suite: Breakpoints

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 on 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 contex menu Debug Target|run
    2. Invoke Continue action
    • EXPECTED RESULT: Program counter is on 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 Breapkoint functionality case
    1. Invoke Continue action
    • EXPECTED RESULT: Rest of target run is executed without stopping. Debugger views are closed
    • 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 contex 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). Debugger views are closed
    • Teardown: Remove breakpoint


Test suite: Watches

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

  1. New watch from editor
    1. Invoke action New Watch from contex menu in editor area
    2. Write name of watch hello and press OK
    • EXPECTED RESULT: Watch with name hello is created and displayed in Watches view.
    • Teardown: Delete watch
  2. New watch from view
    1. Invoke action New Watch from contex menu in Watches view
    2. Write name of watch hello and press OK
    • EXPECTED RESULT: Watch with name hello is created and displayed in Watches view.
    • Teardown: Delete watch
  3. 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
    4. Invoke Continue action
    • EXPECTED RESULT: Program counter is on line 35. Watches view shows watch ant.project.name with value anagrams
    • Teardown: Finish debugging session and delete watch
  4. Local variables
    1. Select node build.xml and invoke from its context menu Debug Target|run
    2. Invoke Window|Debugging|Local Variables from main menu
    • EXPECTED RESULT: Local Variables lists all properties set for the build script. List contains ant.project.name with value anagrams
    • Teardown: Finish debugging session


Test suite: Highlighting

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

  1. Program counter - line
    1. Select node build.xml and invoke from its context menu Debug Target|run
    • EXPECTED RESULT: Line 35 is highlighted with green background and green arrow in gutter
    • Teardown: Finish debugger
  2. Program counter - after Step over
    • Setup: Continue with case Program counter - line
    1. Invoke Step Over action
    • {{{1}}}
    1. Invoke Step Into action 5 times
    • EXPECTED RESULT: Whole target -init-private is highlighted green. On line 61 is green arrow in gutter.
    1. Toggle breakpoint on line 62
    • EXPECTED RESULT: Line 62 is highlighted with red background and red square in gutter
    1. Invoke Window|Debugging|Breakpoints action
    2. In Breakpoints view select breakpoint build-impl.xml:62 and invoke Disable from its context menu
    • EXPECTED RESULT: Line 62 is highlighted with gray background and gray square in gutter
    1. Enable disabled breakpoint
    2. Invoke Continue action
    • EXPECTED RESULT: Line 62 is highlighted with green background and red square with green arrow in gutter
    • Teardown: Finish debugger and remove breakpoint

}}
}}

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