TS 70 Ant Sanity

NetBeans Sanity Ant Test Specification

Author: Tomas Musil
Last update: 26.11.2008
Introduction: This document is intended to be a sanity test specification for NetBeans ant module. It can be used when the manual testing of NetBeans Ant module is executed. Scenarios in this documents cover main areas of the module functionality testing.


Contents

Test suite: Target Context Menu

Purpose:
Setup:

  1. Open Script
    1. Select Open in context menu of ant build script
    • EXPECTED RESULT: Script must be opened in editor.


Test suite: Run Target

Purpose:
Setup:

  1. Run Target
    1. Invoke action Run Target on any type of target (default, regular, imported, overridden, with description)
    • EXPECTED RESULT: All targets must be successfully executed and each target prints some identifying message into Output Window.
  1. Create target with name 'property'
    1. Write <target name="property"><echo message="TargetProperty = ${target.property}"/></target> to the build.xml prior to project ending tag (</project>)
    2. Invoke popup menu item Run target|Other targets|property
    • {{{1}}}
  1. Run Target - Advanced
    1. Invoke Run Target | Advanced on build.xml
    2. Select 'property' target in the combo box
    3. Enter property 'target.property=ahoj', click Run
    • {{{1}}}
  1. Run Target - Advanced, Verbosity level
    1. Invoke Run Target | Advanced on build.xml
    2. Select any target and change Verbosity level to Debug, click Run
    • EXPECTED RESULT: Target must be successfully executed and debugging info must be printed to Output Window.



Test suite: Actions coverage

Purpose: To cover actions calling that are related to Ant (Run Target, Debug Target, Repeat Build/Run, Stop Build/Run)
Setup: Create new j2se project named PRJ_1 and create new JFrame Form in this project with name JFrame_1

  1. Stop Build/Run
    1. Select JFrame_1 in the Projects view.
    2. Invoke popup menu and push Run File (try Shift+F6 too).
    3. In main menu select Run|Stop Build/Run: PRJ_1(run-single).
    • EXPECTED RESULT: The process with JFrame_1 finishes, the JFrame_1 is closed. The menu item gets disabled.Try the same with corresponding icon in output.
  1. Repeat Build/Run
    1. Invoke popup menu and push Run File (try Shift+F6 too).
    2. In main menu select Run|Repeat Build/Run: PRJ_1(run-single).
    • EXPECTED RESULT: The JFrame_1 form must appear. Close the JFrame_1 form. Try the same with corresponding icon in output.
  1. Test Run Target submenu
    1. Select build.xml belonging to the PRJ_1 in the Files View and invoke popup menu.
    2. Select Run Target and invoke some of its subitems including subitems of Other Targets.
    • EXPECTED RESULT: Proper target must be executed and the corresponding output must be printed to output window.
  1. Test Debug Target submenu
    1. Select build.xml belonging to the PRJ_1 in the Files View and invoke popup menu.
    2. Select Debug Target and invoke each of its subitems including subitems of Other Targets.
    • EXPECTED RESULT: Proper target must start in debugger and corresponding output must be printed to output window.


Test suite: Ant Options

Purpose: To cover testing of general options related to Ant
Setup: Run IDE with clear userdir and go to Tools|Options (or NetBeans|Preferences on Mac)


  1. Change ant home
    1. Push Browse... button and select some older version of Ant.
    • EXPECTED RESULT: The older ant version path appears in ant home textfield. This ant version is used then for invoking project targets in IDE. The text below the textfield contains information about Ant version and the compilation date.
  1. Set default ant home
    1. Push default button.
    • EXPECTED RESULT: The default path appears again in ant home textfield. This ant version is used then for invoking project targets in IDE. The text below the textfield contains information about Ant version and the compilation date.
  1. Verbosity level set up
    1. Create new j2se project PRJ_001.
    2. In ant options set the verbosity level to verbose and run the project
    • EXPECTED RESULT: The output window contains proper text according to selected verbosity level.
  1. Saving files test
    1. Set Verbosity Level to "Normal".
    2. Deselect all checkboxes below the Ant Home textfield.
    3. Write some "System.out.println("saved");" to the main method of opened Main class of PRJ_001.
    4. Run project by F6->The file is not saved ("saved" is not printed in output window).
    5. Set the Checkbox "Save All Modified Files Before Running Ant" selected again and push F6
    • EXPECTED RESULT: The Main file is saved first and then executed ("saved" is printed in output window).
  1. Test of tab reuse
    1. Push F6 -> A new tab is added to output window
    2. In Options dialog set checkbox "Reuse Output Tabs from Finished Processes" selected
    3. Close options
    4. Run default project by F6
    • EXPECTED RESULT: A new tab is not added to output window, tabs disappear from the output window and only one open window is available.
  1. Always show output
    1. In Ant options set checkbox "Always Show Output" selected
    2. Go to Editor - select it by Ctrl+0
    3. Push Shift+Escape to maximize editor
    4. Push Shift-F11-> output window appears (always hide it by Escape)
    5. In Ant Options set checkbox unselect checkbox "Always Show Output"
    6. Close options
    7. Push Shift-F11
    • EXPECTED RESULT: Output window doesn't pop up.
  1. Create target test
    1. Create new j2se project PRJ_XYZ
    2. Open Files view and open the build.xml
    3. Type "<target name="xyz"><echo message="xyz = ${xyz.property}"/></target>"
    4. Execute target xyz (Run target|Other Targets|xyz)
    • {{{1}}}
  1. Properties test
    1. Go to ant options and write to properties text area the following line:
      xyz.property=yep!
    2. Execute target xyz (Run target|Other Targets|xyz)
    • {{{1}}}


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