TS 72 configurable

Form Editor - Window configurable Test Specification

Author: Adam Senk
Version: 7.2
Last update: 2012/03/30
Introduction: Window configurable.
Comments:

Contents


Test suite: See / set global options

Purpose: Global options - assure set options in main menu Tools -> Options.
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication).

  1. Form objects - Option Generate Component as:
    1. Invoke Tools -> Options from main menu.
    2. Push button Java
    3. Select GUI Builder Tab.
    4. Check option "Local Variables in initComponents() Method" and press OK to close option dialog
    5. Create new JFrame and placed new e.g. jButton component there
    6. Switch to source and check source code
    • EXPECTED RESULT: jButton component should be declared in initComponents() method
  2. Form objects - Option Generate Component as:
    1. Invoke Tools -> Options from main menu.
    2. Push button Java
    3. Select GUI Builder Tab.
    4. Check option "Fields in the Form class" and press OK to close option dialog
    5. Create new JFrame and placed new e.g. jButton component there
    6. Switch to source and check source code
    • EXPECTED RESULT: jButton component should be declared in declarations section in from class, not in initComponent() Method
  3. Form objects - Option Variable Modifier
    1. Invoke Tools -> Options from main menu.
    2. Push button Java
    3. Select GUI Builder Tab.
    4. Choose "public" item in combobox for Variable Modifier option
    5. Create new JFrame and placed new e.g. jButton component there
    6. Switch to source and check source code
    • EXPECTED RESULT: jButton component should be declared in declarations section in from class, with appropriate modifier
  4. Form objects - Option Variable Modifier
    1. Do previous testcase for all possible modifiers
    • EXPECTED RESULT: jButton component should be declared in declarations section in from class, with chosen modifier
  5. Form objects - Option Listener Generation style
    1. Invoke Tools -> Options from main menu.
    2. Push button Java
    3. Select GUI Builder Tab.
    4. Choose "Main Class" item in combobox for Listener Generation style option (assure that Variables are set as to be generated as "Fields in the Form Class")
    5. Create new JFrame and placed new e.g. jButton component there
    6. Do double click on jButton in design
    • EXPECTED RESULT: Handler for jButton should be automatically generated in source after double click without compilation errors
  6. Form objects - Option Listener Generation style
    1. Invoke Tools -> Options from main menu.
    2. Push button Java
    3. Select GUI Builder Tab.
    4. Choose "One Inner Class" item in combobox for Listener Generation style option (assure that Variables are set as to be generated as "Fields in the Form Class")
    5. Create new JFrame and placed new e.g. jButton component there
    6. Do double click on jButton in design
    • EXPECTED RESULT: Handler for jButton should be automatically generated in source after double click without compilation errors
  7. Form objects - Option Listener Generation style
    1. Invoke Tools -> Options from main menu.
    2. Push button Java
    3. Select GUI Builder Tab.
    4. Choose "Annonymous Inner Classes" item in combobox for Listener Generation style option (assure that Variables are set as to be generated as "Fields in the Form Class")
    5. Create new JFrame and placed new e.g. jButton component there
    6. Do double click on jButton in design
    • EXPECTED RESULT: Handler for jButton should be automatically generated in source after double click without compilation errors
  8. Form objects - Option Automatic Internationalization
    1. Invoke Tools -> Options from main menu.
    2. Push button Java
    3. Select GUI Builder Tab.
    4. Set option Automatic Internationalization on "ON"
    5. Create new JFrame and placed new e.g. jButton component there
    6. Switch to source code
    • EXPECTED RESULT: Text of jButton should be handled from ResourceBundle
  9. Form objects - Option Automatic Internationalization
    1. Invoke Tools -> Options from main menu.
    2. Push button Java
    3. Select GUI Builder Tab.
    4. Set option Automatic Internationalization on "OFF"
    5. Create new JFrame and placed new e.g. jButton component there
    6. Switch to source code
    • EXPECTED RESULT: Text of jButton should not be handled from ResourceBundle
  10. Form objects - Option Layout Generation Style
    1. Invoke Tools -> Options from main menu.
    2. Push button Java
    3. Select GUI Builder Tab.
    4. Choose Swing Layout Extensions Libray and set it in combo for Layou Generation Style option
    5. Create new JFrame
    6. Switch to source code
    • EXPECTED RESULT: Fully qualified name for Group Layout should be generated as org.jdesktop.layout.GroupLayout
  11. Form objects - Option Layout Generation Style
    1. Invoke Tools -> Options from main menu.
    2. Push button Java
    3. Select GUI Builder Tab.
    4. Choose Standard Java 6 Code and set it in combo for Layou Generation Style option
    5. Create new JFrame
    6. Switch to source code
    • EXPECTED RESULT: Fully qualified name for Group Layout should be generated as javax.swing.GroupLayout
  12. Form objects - Option Set Component Names
    1. Invoke Tools -> Options from main menu.
    2. Push button Java
    3. Select GUI Builder Tab.
    4. Set option Set Component Names on "ON"
    5. Create new JFrame and placed new e.g. jButton component there
    6. Switch to source code
    • EXPECTED RESULT: There should be generated method setName() for jButton
  13. Form objects - Option Set Component Names
    1. Invoke Tools -> Options from main menu.
    2. Push button Java
    3. Select GUI Builder Tab.
    4. Set option Set Component Names on "OFF"
    5. Create new JFrame and placed new e.g. jButton component there
    6. Switch to source code
    • EXPECTED RESULT: Method setName() should not be generated for jButton
  14. Form objects - Option Fold Generated Code
    1. Invoke Tools -> Options from main menu.
    2. Push button Java
    3. Select GUI Builder Tab.
    4. Uncheck option Fold Generated Code
    5. Create new JFrame
    6. Switch to source code
    • EXPECTED RESULT: initComponent() method should be expanded in source editor
  15. Form objects - Option Fold Generated Code
    1. Invoke Tools -> Options from main menu.
    2. Push button Java
    3. Select GUI Builder Tab.
    4. Check option Fold Generated Code
    5. Create new JFrame
    6. Switch to source code
    • EXPECTED RESULT: initComponent() method should be collapsed in source editor
  16. Form objects - Option Show Assistant
    1. Create new JFrame and stay in design mode
    2. Invoke Tools -> Options from main menu.
    3. Push button Java
    4. Select GUI Builder Tab.
    5. Uncheck option Show Assistant
    6. Confirm option dialog
    • EXPECTED RESULT: Assistant which short hints should not be displayed above the designer
  17. Form objects - Option Show Assistant
    1. Create new JFrame and stay in design mode
    2. Invoke Tools -> Options from main menu.
    3. Push button Java
    4. Select GUI Builder Tab.
    5. Check option Show Assistant
    6. Confirm option dialog
    • EXPECTED RESULT: Assistant which short hints should be displayed above the designer
  18. Form objects - Option Guide Line Color
    1. Create new JFrame and stay in design mode
    2. Invoke Tools -> Options from main menu.
    3. Push button Java
    4. Select GUI Builder Tab.
    5. Invoke Color Chooser for Guide Line Color option and choose some color (test all types Swatches, HSB, RGB, AWT_Palette, System Palette). Test not only color selecting but it's needed to test just colors code numbers inserted in textfiled as well
    6. Confirm option dialog
    • EXPECTED RESULT: Color of Guide Lines should be changed according to settings in General Options
  19. Form objects - Option Selection Border Color
    1. Create new JFrame and stay in design mode
    2. Invoke Tools -> Options from main menu.
    3. Push button Java
    4. Select GUI Builder Tab.
    5. Invoke Color Chooser for Selection Border Color option and choose some color (test all types Swatches, HSB, RGB, AWT_Palette, System Palette). Test not only color selecting but it's needed to test just colors code numbers inserted in textfiled as well
    6. Confirm option dialog
    • EXPECTED RESULT: Color of selection border lines should be changed according to settings in General Options
  20. Component palette
    1. Invoke Tools -> Palete Customizer from main menu.
    2. Delete, Rename, Move up/down, Change order of categories and beans. Cut, Copy, Delete and Paste component from one category to another or to the same. Select more components or categories and try cutting, deleting and copying.
    3. All changes assure in Component palette and try creating new frame with these components.
    • EXPECTED RESULT: Everything should go smoothly
  21. Templates
    1. Invoke Tools -> Templates Manager from main menu.
    2. Select and expand Swing GUI Forms node.
    3. Add some new templates and set their Properties and Execution.
    • EXPECTED RESULT: Assure using new templates.


Test suite: Test shortcuts

Purpose: Shortcuts - assure set shortcuts in Main Window Tools -> Options -> Keymap
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g MyJFrame).

  1. Shortcuts in Form Editor and Component Inspector
    1. Use Tools -> Options -> Keymap (Form) to see shortcuts -> action mapping and test all defined shortcuts.
    2. Create new shortcuts for tested action and test their in Form Editor and Component Inspector.
    • EXPECTED RESULT: The intended action should be invoked for particular shortcut.


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