cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

Form Editor - Code Generation Test Specification

Author: Jaromir Uhrik, Marek Grummich
Version: 5.0
Last update: 22.09.2005
Introduction: This is intended as Code Generation tests for created Swing/AWT files and components.
Comment:

Table of Contents

Test suite 1: Create forms from Templates

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

#Test caseDescription
1Create new JApplet
  1. Select MyApplication/Source Packages/myapplication in the Project view
  2. Choose from popup New | File/Folder...
  3. Choose Java GUI Forms > JApplet Form and press Next> button.
  4. In New Wizard type name "MyJApplet"
  5. Push Finish
RESULT:MyJApplet tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyJApplet" contains subnodes : "Other Components" and "[JApplet]".
2Create new JDialog
  1. Select MyApplication/Source Packages/myapplication in the Project view
  2. Choose from popup New | File/Folder...
  3. Choose Java GUI Forms > JDialog Form and press Next> button.
  4. In New Wizard type name "MyJDialog"
  5. Push Finish
RESULT:MyJDialog tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyJDialog" contains subnodes : "Other Components" and "[JDialog]".
3Create new JFrame
  1. Select MyApplication/Source Packages/myapplication in the Project view
  2. Choose from popup New | File/Folder...
  3. Choose Java GUI Forms > JFrame Form and press Next> button.
  4. In New Wizard type name "MyJFrame"
  5. Push Finish
RESULT:MyJFrame tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyJFrame" contains subnodes : "Other Components" and "[JFrame]".
4Create new JInternalFrame
  1. Select MyApplication/Source Packages/myapplication in the Project view
  2. Choose from popup New | File/Folder...
  3. Choose Java GUI Forms > JInternalFrame Form and press Next> button.
  4. In New Wizard type name "MyJInternalFrame"
  5. Push Finish
RESULT:MyJInternalFrame tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyJInternalFrame" contains subnodes : "Other Components" and "[JInternalFrame]".
5Create new JPanel
  1. Select MyApplication/Source Packages/myapplication in the Project view
  2. Choose from popup New | File/Folder...
  3. Choose Java GUI Forms > JPanel Form and press Next> button.
  4. In New Wizard type name "MyJPanel"
  5. Push Finish
RESULT:MyJPanel tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyJPanel" contains subnodes : "Other Components" and "[JPanel]".
6Create 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 Java 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
RESULT:BeanOnJPanel tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form BeanOnJPanel" contains subnodes : "Other Components" and "[JPanel]".
7Create 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 Java 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
RESULT:BeanOnJButton tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form BeanOnJButton" contains subnodes : "Other Components" and "[JButton]".
8Create 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 Java 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
RESULT:BeanOnPanel tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form BeanOnPanel" contains subnodes : "Other Components" and "[Panel]".
9Create new Applet
  1. Select MyApplication/Source Packages/myapplication in the Project view
  2. Choose from popup New | File/Folder...
  3. Choose Java GUI Forms > AWT Forms > Applet Form and press Next> button.
  4. In New Wizard type name "MyApplet"
  5. Push Finish
RESULT:MyApplet tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyApplet" contains subnodes : "Other Components" and "[Applet]".
10Create new Dialog
  1. Select MyApplication/Source Packages/myapplication in the Project view
  2. Choose from popup New | File/Folder...
  3. Choose Java GUI Forms > AWT Forms > Dialog Form and press Next> button.
  4. In New Wizard type name "MyDialog"
  5. Push Finish
RESULT:MyDialog tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyDialog" contains subnodes : "Other Components" and "[Dialog]".
11Create new Frame
  1. Select MyApplication/Source Packages/myapplication in the Project view
  2. Choose from popup New | File/Folder...
  3. Choose Java GUI Forms > AWT Forms > Frame Form and press Next> button
  4. In New Wizard type name "MyFrame"
  5. Push Finish
RESULT:MyFrame tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyFrame" contains subnodes : "Other Components" and "[Frame]".
12Create new Panel
  1. Select MyApplication/Source Packages/myapplication in the Project view
  2. Choose from popup New | File/Folder...
  3. Choose Java GUI Forms > AWT Forms > Panel Form and press Next> button.
  4. In New Wizard type name "MyPanel"
  5. Push Finish
RESULT:MyPanel tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyPanel" contains subnodes : "Other Components" and "[Panel]".
13Create new Application
  1. Select MyApplication/Source Packages/myapplication in the Project view
  2. Choose from popup New | File/Folder...
  3. Choose Java GUI Forms > Sample Forms > Application and press Next> button.
  4. In New Wizard type name "MyApplication"
  5. Push Finish
RESULT:MyApplication tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyApplication" contains subnodes : "Other Components" and "[JFrame]".
14Create new MDI Application
  1. Select MyApplication/Source Packages/myapplication in the Project view
  2. Choose from popup New | File/Folder...
  3. Choose Java GUI Forms > Sample Forms > MDI Application and press Next> button.
  4. In New Wizard type name "MyMDIApplication"
  5. Push Finish
RESULT:MyMDIApplication tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyMDIApplication" contains subnodes : "Other Components" and "[JFrame]".
15Create new Ok/Cancel Dialog
  1. Select MyApplication/Source Packages/myapplication in the Project view
  2. Choose from popup New | File/Folder...
  3. Choose Java GUI Forms > Sample Forms > OK / Cancel Dialog and press Next> button.
  4. In New Wizard type name "MyOKCancelDialog"
  5. Push Finish
RESULT:MyOKCancelDialog tab is available. Form contains component Palette, Inspector and Form Designer. Node "Form MyOKCancelDialog" contains subnodes : "Other Components" and "[JDialog]".

Test suite 2: Code Generation of beans properties

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

#Test caseDescription
1Change 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
RESULT:Assure generated code.
2Generate 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
RESULT:Assure generated code.

Test suite 3: 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.

#Test caseDescription
1Appearance 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)
RESULT:All components have A11Y node in properties except: JSpinner and ButtonGroup.
2Appearance 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)
RESULT:All top-containers have A11Y node in properties.
3Appearance 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)
RESULT:All menu components have A11Y node in properties. Bug# 22786
4Generated 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
RESULT:Code is generated properly.

Generated: 2005 09 22 11:21
Companion
Projects:
MySQL Database Server   GlassFish Community: an Open Source Application Server   Open Solaris  Open JDK: an Open SourceJDK   Mobile & Embedded Community     Sponsored by 
Sponsored by Sun Microsystems