TS 60 codegenerator

Form Editor - Code Generation Test Specification

Author: Jana Maleckova, Jaromir Uhrik
Version: 6.0
Lastupdate: 2007/01/10
Introduction: This is intended as Code Generation tests for created Swing/AWT files and components.

Contents

Test suite: Create forms from Templates

Purpose:
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication).

  1. Create new JApplet
    1. Select MyApplication/Source Packages/myapplication in the Project view
    2. Choose from popup New | File/Folder...
    3. Choose Swing GUI Forms > JApplet Form and press Next> button.
    4. In New Wizard type name "MyJApplet"
    5. Push Finish
    • EXPECTED RESULT: MyJApplet tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyJApplet" contains subnodes : "Other Components" and "JApplet".
  2. Create new JDialog
    1. Select MyApplication/Source Packages/myapplication in the Project view
    2. Choose from popup New | File/Folder...
    3. Choose Swing GUI Forms > JDialog Form and press Next> button.
    4. In New Wizard type name "MyJDialog"
    5. Push Finish
    • EXPECTED RESULT: MyJDialog tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyJDialog" contains subnodes : "Other Components" and "JDialog".
  3. Create new JFrame
    1. Select MyApplication/Source Packages/myapplication in the Project view
    2. Choose from popup New | File/Folder...
    3. Choose Swing GUI Forms > JFrame Form and press Next> button.
    4. In New Wizard type name "MyJFrame"
    5. Push Finish
    • EXPECTED RESULT: MyJFrame tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyJFrame" contains subnodes : "Other Components" and "JFrame".
  4. Create new JInternalFrame
    1. Select MyApplication/Source Packages/myapplication in the Project view
    2. Choose from popup New | File/Folder...
    3. Choose Swing GUI Forms > JInternalFrame Form and press Next> button.
    4. In New Wizard type name "MyJInternalFrame"
    5. Push Finish
    • EXPECTED RESULT: MyJInternalFrame tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyJInternalFrame" contains subnodes : "Other Components" and "JInternalFrame".
  5. Create new JPanel
    1. Select MyApplication/Source Packages/myapplication in the Project view
    2. Choose from popup New | File/Folder...
    3. Choose Swing GUI Forms > JPanel Form and press Next> button.
    4. In New Wizard type name "MyJPanel"
    5. Push Finish
    • EXPECTED RESULT: MyJPanel tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyJPanel" contains subnodes : "Other Components" and "JPanel".
  6. Create new Bean based on javax.swing.JPanel
    1. Select MyApplication/Source Packages/myapplication in the Project view
    2. Choose from popup New | File/Folder...
    3. Choose Swing GUI Forms > Bean Form and press Next> button.
    4. In New Wizard type name "BeanOnJPanel"
    5. Push Next
    6. In New Wizard type superclass "javax.swing.JPanel"
    7. Push Finish
    • EXPECTED RESULT: BeanOnJPanel tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form BeanOnJPanel" contains subnodes : "Other Components" and "JPanel".
  7. Create new Bean based on javax.swing.JButton
    1. Select MyApplication/Source Packages/myapplication in the Project view
    2. Choose from popup New | File/Folder...
    3. Choose Swing GUI Forms > Bean Form and press Next> button.
    4. In New Wizard type name "BeanOnJButton"
    5. Push Next
    6. In New Wizard type superclass "javax.swing.JButton"
    7. Push Finish
    • EXPECTED RESULT: BeanOnJButton tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form BeanOnJButton" contains subnodes : "Other Components" and "JButton".
  8. Create new Bean based on java.awt.Panel
    1. Select MyApplication/Source Packages/myapplication in the Project view
    2. Choose from popup New | File/Folder...
    3. Choose Swing GUI Forms > Bean Form and press Next> button.
    4. In New Wizard type name "BeanOnPanel"
    5. Push Next
    6. In New Wizard type superclass "java.awt.Panel"
    7. Push Finish
    • EXPECTED RESULT: BeanOnPanel tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form BeanOnPanel" contains subnodes : "Other Components" and "Panel".
  9. Create new Applet
    1. Select MyApplication/Source Packages/myapplication in the Project view
    2. Choose from popup New | File/Folder...
    3. Choose AWT GUI Forms > Applet Form and press Next> button.
    4. In New Wizard type name "MyApplet"
    5. Push Finish
    • EXPECTED RESULT: MyApplet tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyApplet" contains subnodes : "Other Components" and "Applet".
  10. Create new Frame
    1. Select MyApplication/Source Packages/myapplication in the Project view
    2. Choose from popup New | File/Folder...
    3. Choose AWT GUI Forms > Frame Form and press Next> button
    4. In New Wizard type name "MyFrame"
    5. Push Finish
    • EXPECTED RESULT: MyFrame tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyFrame" contains subnodes : "Other Components" and "Frame".
  11. Create new Panel
    1. Select MyApplication/Source Packages/myapplication in the Project view
    2. Choose from popup New | File/Folder...
    3. Choose AWT GUI Forms > Panel Form and press Next> button.
    4. In New Wizard type name "MyPanel"
    5. Push Finish
    • EXPECTED RESULT: MyPanel tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyPanel" contains subnodes : "Other Components" and "Panel".
  12. Create new Application
    1. Select MyApplication/Source Packages/myapplication in the Project view
    2. Choose from popup New | File/Folder...
    3. Choose Swing GUI Forms > Application Sample Form and press Next> button.
    4. In New Wizard type name "MyApplication"
    5. Push Finish
    • EXPECTED RESULT: MyApplication tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyApplication" contains subnodes : "Other Components" and "JFrame".
  13. Create new MDI Application
    1. Select MyApplication/Source Packages/myapplication in the Project view
    2. Choose from popup New | File/Folder...
    3. Choose Swing GUI Forms > MDI Application Sample Form and press Next> button.
    4. In New Wizard type name "MyMDIApplication"
    5. Push Finish
    • EXPECTED RESULT: MyMDIApplication tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyMDIApplication" contains subnodes : "Other Components" and "JFrame".
  14. Create new Ok/Cancel Dialog
    1. Select MyApplication/Source Packages/myapplication in the Project view
    2. Choose from popup New | File/Folder...
    3. Choose Swing GUI Forms > OK / Cancel Dialog Sample Form and press Next> button.
    4. In New Wizard type name "MyOKCancelDialog"
    5. Push Finish
    • EXPECTED RESULT: MyOKCancelDialog tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyOKCancelDialog" contains subnodes : "Other Components" and "JDialog".
  15. Create new Master/Detailed Sample Form
    1. Select MyApplication/Source Packages/myapplication in the Project view
    2. Choose from popup New | File/Folder...
    3. Choose Swing GUI Forms > Master/Detailed Sample Form and press Next> button.
    4. In New Wizard type name "MyMasterForm" and press Next> button.
    5. Choose database connection
    6. Choose database table from your selected database and press Next> button
    7. Push Finish
    • EXPECTED RESULT: MyMasterForm tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyMasterForm" contains subnodes : "Other Components" and "JPanel".


Test suite: Code Generation of beans properties

Purpose:
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication).

  1. Change properties of components
    1. Open/Create MyJFrame
    2. Select/add component JLabel1
    3. Change properties for selected component
    4. Assure generated code
    5. Repeat this test for: JButton, JToggleButton, JCheckBox, JRadioButton, JComboBox, JList, JTextField, JTextArea, JPanel, JScrollPane, JMenuBar, JPopupMenu, JSlider, JProgressBar, JSplitPane, JPasswordField, JSeparator, JSpinner, JFormattedText, JTextPane, JEditorPane, JTree, JToolBar, JInternalFrame, JLayeredPane, JDesktopPane, JOptionPane, JColorChoser, JFileChooser, JFrame, JDialog, JMenuItem, JCheckBoxMenuItem, JRadioButtonMenuItem, JMenu, JSeparator, Label, Button, TextField, TextArea, CheckBox, Choice, List, ScrollBar, ScrollPane, Panel, Canvas, MenuBar, MenuItem, CheckBoxMenuItem, Menu, Separator
    • EXPECTED RESULT: Assure generated code.
  2. Generate code from Customize Bean
    1. Add own bean that is compiled to Pallete (in explorer invoke popup on a bean and select Tools | Add to Component Palette... - then select category and press OK)
    2. Create a new form
    3. Add bean to this form
    4. Set properties for selected bean
    • EXPECTED RESULT: Assure generated code.


Test suite: Accesibility

Purpose: Assure appearance A11Y node in properties of components. Assure proper generated code.
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new JFrame.

  1. Appearance of A11Y for components
    1. Add step by step all components to form from tabs Swing, AWT
    2. Assure occurence of A11Y node in propertysheet (tab Basic properties)
    • EXPECTED RESULT: All components have A11Y node in properties except: JSpinner and ButtonGroup.
  2. Appearance of A11Y for top containers
    1. Create all Gui form offered by IDE: JForm, JDialog, JFrame, JInternalFrame, JPanel, Applet, Form, Frame, Panel
    2. Select Top Container in Component Inspector
    3. Assure occurence of A11Y node in propertysheet (tab Basic properties)
    • EXPECTED RESULT: All top-containers have A11Y node in properties.
  3. Appearance of A11Y node for menu components
    1. Add to JForm JMenu, JPopupMenu
    2. For JMenu add JMenuItem, JCheckBoxMenuItem, JRadioButtonMenuItem, JMenu, JSeparator
    3. Assure occurence of A11Y node in propertysheet (tab Basic properties)
    • EXPECTED RESULT: All menu components have A11Y node in properties. Bug# 22786
  4. Generated code for A11Y
    1. Add JButton to form
    2. Change all A11Y properties: A11Y Name, A11Y Description, A11Y Parent
    3. Assure generated code
    4. Repeat this test for Button, JMenuItem, JForm - top container
    • EXPECTED RESULT: Code is generated properly.

}}
}}

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