TS 60 visualdevelopment

Visual Development Test Specification

Author: Jana Maleckova, Jaromir Uhrik
Version: 6.0
Last update:2007/08/15
Introduction: This is intended as tests of Form Editor module.
Comments:

Contents


Test suite: Add Menu items tests

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

  1. Create JMenu in JMenuBar
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> JMenu
    • EXPECTED RESULT: Proper code is generated
  1. Add JMenuItem to JMenu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> JMenuItem
    • EXPECTED RESULT: Proper code is generated
  1. Add JCheckBoxMenuItem to JMenu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> JCheckBoxMenuItem
    • EXPECTED RESULT: Proper code is generated
  1. Add JRadioButtonMenuItem to JMenu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> JRadioButtonMenuItem
    • EXPECTED RESULT: Proper code is generated
  1. Add JMenu to JMenu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> JMenu
    • EXPECTED RESULT: Proper code is generated
  1. Add JSeparator to JMenu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> JSeparator
    • EXPECTED RESULT: Proper code is generated
  1. Create JMenu in JPopupMenu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> JMenu
    • EXPECTED RESULT: Proper code is generated
  1. Add JMenuItem to JPopupMenu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> JMenuItem
    • EXPECTED RESULT: Proper code is generated
  1. Add JCheckBoxMenuItem to JPopupMenu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> JCheckBoxMenuItem
    • EXPECTED RESULT: Proper code is generated
  1. Add JRadioButtonMenuItem to JPopupMenu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> JRadioButtonMenuItem
    • EXPECTED RESULT: Proper code is generated
  1. Add JMenu to JPopupMenu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> JMenu
    • EXPECTED RESULT: Proper code is generated
  1. Add JSeparator to JPopupMenu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> JSeparator
    • EXPECTED RESULT: Proper code is generated
  1. Create Menu in MenuBar
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> Menu
    • EXPECTED RESULT: Proper code is generated
  1. Add MenuItem to Menu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> MenuItem
    • EXPECTED RESULT: Proper code is generated
  1. Add MenuItem to Menu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> CheckBoxMenuItem
    • EXPECTED RESULT: Proper code is generated
  1. Add Menu to Menu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> Menu
    • EXPECTED RESULT: Proper code is generated
  1. Add Separator to Menu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> Separator
    • EXPECTED RESULT: Proper code is generated
  1. Create Menu in PopupMenu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> Menu
    • EXPECTED RESULT: Proper code is generated
  1. Add MenuItem to PopupMenu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> MenuItem
    • EXPECTED RESULT: Proper code is generated
  1. Add CheckBoxMenuItem to PopupMenu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> CheckBoxMenuItem
    • EXPECTED RESULT: Proper code is generated
  1. Add Menu to PopupMenu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> Menu
    • EXPECTED RESULT: Proper code is generated
  1. Add Separator to PopupMenu
    1. Open file MyJFrame and created JMenu and JPopupMenu components if they are missing.
    2. Select jMenuBar1 and invoke popup menu.
    3. Push Add -> Separator
    • EXPECTED RESULT: Proper code is generated


Test suite: Add AWT and Swing components together

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

  1. Add JLabel and Label into JFrame
    1. Create new JFrame.
    2. Select component JLabel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select component Label from Component Palette category AWT.
    5. Click into Form Designer.
    • EXPECTED RESULT: Code for added JLabel and Label is generated.
  1. Add JPanel and Canvas into Frame
    1. Create new Frame.
    2. Select component JPanel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select component Canvas from Component Palette category AWT.
    5. Click into Form Designer.
    • EXPECTED RESULT: Code for added JPanel and Canvas is generated.


Test suite: Test moving and resizing components in Form Designer

Purpose: Test posibility for move and resize components in Form Designer.
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g MyJFrame).

  1. Move components in one container
    1. Add three buttons to JForm.
    2. Set Layout to FlowLayout and change order of components.
    3. Set Layout to BorderLayout and change direction for components.
    4. Set Layout to GridLayout and change order of components, change number of columns and rows to 2 and repeat test.
    5. Set Layout to GridBagLayout and try change position - it is without success.
    6. Set Layout to CardLayout and try change position - it is without success.
    7. Set Layout to BoxLayout and change order of components. Change Axis to Y Axis and repeat.
    8. Set Layout to AbsoluteLayout and change position for components.
    9. Change Grid X, Grid Y, Apply Grid to Position in options (Options, Editing, Form Editor Settings) and change position of components with new properties.
    10. Set Layout to NullLayout and change position for components.
    11. For every layout try select two components and change position for both components.
    • EXPECTED RESULT: Properly generated code.
  1. Move components in more containers
    1. Add three JPanels to form, JPanel1, JPanel2, JPanel3.
    2. Remove JPanel2 to JPanel3.
    3. Add at least two buttons to all containers (including JForm).
    4. Move components from one container to another container, try all posibilities.
    5. Select two components from one container and move them.
    6. Select two components from different containers and move them to another container, to the same container.
    7. Remove all container with components into other container.
    • EXPECTED RESULT: Properly generated code.
  1. Resize components
    1. Add components to form.
    2. Try set all Layout (except AbsoluteLayout and NullLayout) and try resize components - without success.
    3. Set AbsoluteLayout.
    4. Resize components and check generate code - for size is used AbsoluteConstraints method.
    • EXPECTED RESULT: Code is generated with AbsoluteConstraints method.
  1. Set the same width size for more components
    1. Create new JFrame
    2. Invoke contextual menu on JFrame in design
    3. Choose action Add From Palette -> Swing Controls -> JButton
    4. Do it again
    5. Change text of jButton1 to "OK"
    6. Change text of jButton2 to "Cancel"
    7. Select both buttons by mouse with keeping ctrl key
    8. Invoke contextual menu in design and choose action Same Size -> Same Width
    • EXPECTED RESULT: The width of buttons should be the same and have to be marked with special mark showing vertical size connectivity.
  1. Set the same height size for more components
    1. Create new JFrame
    2. Invoke contextual menu on JFrame in design
    3. Choose action Add From Palette -> Swing Controls -> JButton
    4. Do it again
    5. Change font size of text on jButton1 to e.g. 24 px
    6. Select both buttons by mouse with keeping ctrl key
    7. Invoke contextual menu in design and choose action Same Size -> Same Height
    • EXPECTED RESULT: The height of buttons should be the same and have to be marked with special mark showing horizontal size connectivity.


Test suite: Add components to containers - Swing

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

  1. Add JTextArea into JPanel
    1. Create new JFrame.
    2. Select component JPanel from Component Palette category Swing.
    3. Select component jPanel1 in Form Designer.
    4. Invoke popup menu and push Add From Palette -> Swing -> JTextArea.
    • EXPECTED RESULT: jPanel1 is present in Component Inspector Tree as Container (parent node). Code for added JTextArea inside JPanel is generated.
  1. Add JPanel into JTabbedPane
    1. Create new JFrame.
    2. Select component JTabbedPane from Component Palette category Swing.
    3. Select component jTabbedPane1 in Form Designer.
    4. Invoke popup menu and push Add From Palette -> Swing -> JPanel.
    • EXPECTED RESULT: jTabbedPane1 is present in Component Inspector Tree as Container (parent node). Code for added JPanel inside JTabbedPane is generated.
  1. Add JTable into JScrollPane
    1. Create new JFrame.
    2. Select component JScrollPane from Component Palette category Swing.
    3. Select component jScrollPane1 in Form Designer.
    4. Invoke popup menu and push Add From Palette -> Swing(Other) -> JTable.
    • EXPECTED RESULT: jScrollPane1 is present in Component Inspector Tree as Container (parent node). Code for added JTable inside JScrollPane is generated.
  1. Add JPanel into JSplitPane
    1. Create new JFrame.
    2. Select component JSplitPane from Component Palette category Swing(Other).
    3. Select component jSplitPane1 in Form Designer.
    4. Invoke popup menu and push Add From Palette -> Swing -> JButton.
    5. Select component jSplitPane1 in Form Designer.
    6. Invoke popup menu and push Add From Palette -> Swing -> JPanel.
    • EXPECTED RESULT: jSplitPane1 is present in Component Inspector Tree as Container (parent node). Code for added JButton and JPanel inside JSplitPane is generated.
  1. Add JToggleButton into JToolBar
    1. Create new JFrame.
    2. Select component JToolBar from Component Palette category Swing(Other).
    3. Select component JjoolBar1 in Form Designer.
    4. Invoke popup menu and push Add From Palette -> Swing -> JToggleButton.
    • EXPECTED RESULT: jToolBar1 is present in Component Inspector Tree as Container (parent node). Code for added JToggleButton inside JToolBar is generated.
  1. Add JTree into JInternalFrame
    1. Create new JFrame.
    2. Select component JInternalFrame from Component Palette category Swing(Other).
    3. Select component jInternalFrame1 in Form Designer.
    4. Invoke popup menu and push Add From Palette -> Swing(Other) -> JTree.
    • EXPECTED RESULT: jInternalFrame1 is present in Component Inspector Tree as Container (parent node). Code for added JTree inside JInternalFrame is generated.
  1. Add JInternalFrame into JDesktopPane
    1. Create new JFrame.
    2. Select component JDesktopPane from Component Palette category Swing(Other).
    3. Select component jDesktopPane1 in Form Designer.
    4. Invoke popup menu and push Add From Palette -> Swing(Other) -> JInternalFrame.
    • EXPECTED RESULT: jDesktopPane1 is present in Component Inspector Tree as Container (parent node). Code for added JInternalFrame inside JDesktopPane is generated.


Test suite: Add components to containers - AWT

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

  1. Add TextArea into ScrollPane
    1. Create new Frame.
    2. Select component ScrollPane from Component Palette category AWT.
    3. Select component scrollPane1 in Form Designer.
    4. Invoke popup menu and push Add From Palette -> AWT -> TextArea.
    • EXPECTED RESULT: scrollPane1 is present in Component Inspector Tree as Container (parent node). Code for added TextArea inside ScrollPane is generated.
  1. Add Canvas into Panel
    1. Create new Frame.
    2. Select component Panel from Component Palette category AWT.
    3. Select component panel1 in Form Designer.
    4. Invoke popup menu and push Add From Palette -> AWT -> Canvas.
    • EXPECTED RESULT: scrollPane1 is present in Component Inspector Tree as Container (parent node). Code for added Canvas inside Panel is generated.


Test suite: In-place editing

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

  1. In-place editing on JLabel
    1. Create new JFrame.
    2. Select component JLabel from Component Palette category Swing.
    3. Select component jLabel1 in Form Designer.
    4. Press SPACE.
    5. Type "My Text" into shown in-place editor (textfield).
    • EXPECTED RESULT: Generated code: jLabel1.setText("My Text");
  1. In-place editing on JButton
    1. Create new JFrame.
    2. Select component JButton from Component Palette category Swing.
    3. Select component jButton1 in Form Designer.
    4. Press SPACE.
    5. Type "My Text" into shown in-place editor (textfield).
    • EXPECTED RESULT: Generated code: jButton1.setText("My Text");
  1. In-place editing on JToggleButton
    1. Create new JFrame.
    2. Select component JToggleButton from Component Palette category Swing.
    3. Select component jToggleButton1 in Form Designer.
    4. Press SPACE.
    5. Type "My Text" into shown in-place editor (textfield).
    • EXPECTED RESULT: Generated code: jToggleButton1.setText("My Text");
  1. In-place editing on JCheckBox
    1. Create new JFrame.
    2. Select component JCheckBox from Component Palette category Swing.
    3. Select component jCheckBox1 in Form Designer.
    4. Press SPACE.
    5. Type "My Text" into shown in-place editor (textfield).
    • EXPECTED RESULT: Generated code: jCheckBox1.setText("My Text");
  1. In-place editing on JRadioButton
    1. Create new JFrame.
    2. Select component JRadioButton from Component Palette category Swing.
    3. Select component jRadioButton1 in Form Designer.
    4. Press SPACE.
    5. Type "My Text" into shown in-place editor (textfield).
    • EXPECTED RESULT: Generated code: jRadioButton1.setText("My Text");
  1. In-place editing on JMenu
    1. Create new JFrame.
    2. Select component JMenuBar from Component Palette category Swing.
    3. Select component jMenu1 in Form Designer.
    4. Press SPACE.
    5. Type "My Text" into shown in-place editor (textfield).
    • EXPECTED RESULT: Generated code: jMenu1.setText("My Text");


Test suite: Layout tests

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

  1. Add FlowLayout from Component Palette to JDialog
    1. Create new JDialog.
    2. Click on layout FlowLayout from Component Palette category Layouts.
    3. Click into Form Designer.
    • EXPECTED RESULT: Code for new layout is generated.
  1. Add BorderLayout from Component Palette to JDialog
    1. Create new JDialog.
    2. Click on layout BorderLayout from Component Palette category Layouts.
    3. Click into Form Designer.
    • EXPECTED RESULT: No code is changed - BorderLayout is default for JDialog.
  1. Add GridLayout from Component Palette to JDialog
    1. Create new JDialog.
    2. Click on layout GridLayout from Component Palette category Layouts.
    3. Click into Form Designer.
    • EXPECTED RESULT: Code for new layout is generated.
  1. Add GridBagLayout from Component Palette to JFrame
    1. Create new JFrame.

Click on layout GridBagLayout from Component Palette category Layouts.


    1. Click into Form Designer.
    • EXPECTED RESULT: Code for new layout is generated.
  1. Add CardLayout from Component Palette to JFrame
    1. Create new JFrame.
    2. Click on layout CardLayout from Component Palette category Layouts.
    3. Click into Form Designer.
    • EXPECTED RESULT: Code for new layout is generated.
  1. Add BoxLayout from Component Palette to JInternalFrame
    1. Create new JInternalFrame.
    2. Click on layout BoxLayout from Component Palette category Layouts.
    3. Click into Form Designer.
    • EXPECTED RESULT: Code for new layout is generated.
  1. Add AbsoluteLayout from Component Palette to Frame
    1. Create new Frame.
    2. Click on layout AbsoluteLayout from Component Palette category Layouts.
    3. Click into Form Designer.
    • EXPECTED RESULT: Code for new layout is generated.
  1. Add Null Layout from Component Palette to Dialog
    1. Create new Dialog.
    2. Click on layout NullLayout from Component Palette category Layouts.
    3. Click into Form Designer.
    • EXPECTED RESULT: Code for new layout is generated.
  1. Set layout for Panel - FlowLayout
    1. Create new Frame.
    2. Select component Panel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select jPanel1 in Component Inspector and invoke popup menu.
    5. Push Set Layout | FlowLayout from popup menu.
    • EXPECTED RESULT: No code is changed in jPanel1 (FlowLayout is default).
  1. Set layout for Panel - BorderLayout
    1. Create new Frame.
    2. Select component Panel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select jPanel1 in Component Inspector and invoke popup menu.
    5. Push Set Layout | BorderLayout from popup menu.
    • EXPECTED RESULT: Layout node under jPanel1 node is changed (shown BorderLayout). Code for new layout is generated.
  1. Set layout for Panel - GridLayout
    1. Create new Frame.
    2. Select component Panel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select jPanel1 in Component Inspector and invoke popup menu.
    5. Push Set Layout | GridLayout from popup menu.
    • EXPECTED RESULT: Layout node under jPanel1 node is changed (shown GridLayout). Code for new layout is generated.
  1. Set layout for Panel - GridBagLayout
    1. Create new Frame.
    2. Select component Panel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select jPanel1 in Component Inspector and invoke popup menu.
    5. Push Set Layout | GridBagLayout from popup menu.
    • EXPECTED RESULT: Layout node under jPanel1 node is changed (shown GridBagLayout). Code for new layout is generated.
  1. Set layout for JPanel - CardLayout
    1. Create new JFrame.
    2. Select component Panel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select jPanel1 in Component Inspector and invoke popup menu.
    5. Push Set Layout | CardLayout from popup menu.
    • EXPECTED RESULT: Layout node under jPanel1 node is changed (shown CardLayout). Code for new layout is generated.
  1. Set layout for JPanel - BoxLayout
    1. Create new JFrame.
    2. Select component Panel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select jPanel1 in Component Inspector and invoke popup menu.
    5. Push Set Layout | BoxLayout from popup menu.
    • EXPECTED RESULT: Layout node under jPanel1 node is changed (shown BoxLayout). Code for new layout is generated.
  1. Set layout for JPanel - AbsoluteLayout
    1. Create new JFrame.
    2. Select component Panel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select jPanel1 in Component Inspector and invoke popup menu.
    5. Push Set Layout | AbsoluteLayout from popup menu.
    • EXPECTED RESULT: Layout node under jPanel1 node is changed (shown AbsoluteLayout). Code for new layout is generated.
  1. Set layout for JPanel - Null Layout
    1. Create new JFrame.
    2. Select component Panel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select jPanel1 in Component Inspector and invoke popup menu.
    5. Push Set Layout | Null Layout from popup menu.
    • EXPECTED RESULT: Layout node under jPanel1 node is changed (shown NullLayout). Code for new layout is generated.
  1. Change layout: FlowLayout to AbsoluteLayout
    1. Create new JFrame.
    2. Select JFrame in Component Inspector and invoke popup menu.
    3. Push Set Layout | AbsoluteLayout from popup menu.
    • EXPECTED RESULT: Layout node under JFrame node is changed (shown AbsoluteLayout). Code for new layout is generated.
  1. Change layout: GridLayout to Null Layout
    1. Create new JFrame.
    2. Select JFrame in Component Inspector and invoke popup menu.
    3. Push Set Layout | Null Layout from popup menu.
    • EXPECTED RESULT: Layout node under JFrame node is changed (shown NullLayout). Code for new layout is generated.
  1. Change layout: GridBagLayout to AbsoluteLayout
    1. Create new JFrame.
    2. Select JFrame in Component Inspector and invoke popup menu.
    3. Push Set Layout | AbsoluteLayout from popup menu.
    • EXPECTED RESULT: Layout node under JFrame node is changed (shown AbsoluteLayout). Code for new layout is generated.
  1. Change layout: GridBagLayout to Null Layout
    1. Create new JFrame.
    2. Select JFrame in Component Inspector and invoke popup menu.
    3. Push Set Layout | Null Layout from popup menu.
    • EXPECTED RESULT: Layout node under JFrame node is changed (shown NullLayout). Code for new layout is generated.
  1. Change layout: CardLayout to Null Layout
    1. Create new JFrame.
    2. Select JFrame in Component Inspector and invoke popup menu.
    3. Push Set Layout | Null Layout from popup menu.
    • EXPECTED RESULT: Layout node under JFrame node is changed (shown NullLayout). Code for new layout is generated.
  1. Change layout: Null Layout to AbsoluteLayout
    1. Create new JFrame.
    2. Select JFrame in Component Inspector and invoke popup menu.
    3. Push Set Layout | AbsoluteLayout from popup menu.
    • EXPECTED RESULT: Layout node under JFrame node is changed (shown AbsoluteLayout). Code for new layout is generated.
  1. Change layout: AbsoluteLayout to Null Layout
    1. Create new JFrame.
    2. Select JFrame in Component Inspector and invoke popup menu.
    3. Push Set Layout | Null Layout from popup menu.
    • EXPECTED RESULT: Layout node under JFrame node is changed (shown NullLayout). Code for new layout is generated.


Test suite: Border tests

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

  1. Set EmptyBorder for JButton
    1. Open existing form file from mounted filesystem..
    2. Select component JButton from Component Palette category Swing.
    3. Click into Form Designer.
    4. Set border-property to EmptyBorder.
    5. Click on jButton1 in Form Designer.
    • EXPECTED RESULT: Code for new border is generated: jButton1.setBorder(new javax.swing.border.EmptyBorder(new java.awt.Insets(1, 1, 1, 1)));
  1. Set LineBorder for JLabel

Open existing form file from mounted filesystem..


    1. Select component JLabel from Component Palette category Swing Controls.
    2. Click into Form Designer.
    3. Set border-property to LineBorder.
    4. Click on jLabel1 in Form Designer.
    • EXPECTED RESULT: Code for new border is generated: jLabel1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0)));
  1. Set MatteBorder for JRadioButton
    1. Open existing form file from mounted filesystem..
    2. Select component JRadioButton from Component Palette category Swing Controls.
    3. Click into Form Designer.
    4. Set border-property to MateBorder.
    5. Click on jRadioButton1 in Form Designer.
    • EXPECTED RESULT: Code for new border is generated: jRadioButton1.setBorder(new javax.swing.border.MatteBorder(null));
  1. Set TitledBorder for JPanel

Open existing form file from mounted filesystem..


    1. Select component JPanel from Component Palette category Swing Containers.
    2. Click into Form Designer.
    3. Set border-property to TitledBorder.
    4. Click on jPanel1 in Form Designer.
    • EXPECTED RESULT: Code for new border is generated: jPanel1.setBorder(new javax.swing.border.TitledBorder(""));
  1. Set EtchedBorder for JTextField

Open existing form file from mounted filesystem..


    1. Select component JTextField from Component Palette category Swing Controls.
    2. Click into Form Designer.
    3. Set border-property to EtchedBorder.
    4. Click on jTextField1 in Form Designer.
    • EXPECTED RESULT: Code for new border is generated: jTextField1.setBorder(new javax.swing.border.EtchedBorder());
  1. Set BevelBorder for JTextArea

Open existing form file from mounted filesystem..


    1. Select component JTextArea from Component Palette category Swing Controls.
    2. Click into Form Designer.
    3. Set border-property to BevelBorder.
    4. Click on jTextArea1 in Form Designer.
    • EXPECTED RESULT: Code for new border is generated: jTextArea1.setBorder(new javax.swing.border.BevelBorder(javax.swing.border.BevelBorder.RAISED));
  1. Set SoftBevelBorder for JCheckBox

Open existing form file from mounted filesystem..


    1. Select component JCheckBox from Component Palette category Swing Controls.
    2. Click into Form Designer.
    3. Set border-property to SoftBevelBorder.
    4. Click on jCheckBox1 in Form Designer.
    • EXPECTED RESULT: Code for new border is generated: jCheckBox1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
  1. Set CompoundBorder for JSplitPane

Open existing form file from mounted filesystem..


    1. Select component JSplitPane from Component Palette category Swing Containers.
    2. Click into Form Designer.
    3. Set border-property to CompoundBorder.
    4. Click on jSplitPane1 in Form Designer.
    • EXPECTED RESULT: Code for new border is generated: jSplitPane1.setBorder(new javax.swing.border.CompoundBorder());


Test suite: Action tests

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

  1. Invoke Design This Container on Panel
    1. Open existing form file from mounted filesystem.
    2. Select component Panel from Component Palette category AWT.
    3. Click into Form Designer.
    4. Select panel1 in Form Designer and invoke popup menu.
    5. Push Design This Container.
    • EXPECTED RESULT: Form Designer displays only panel1 as the whole design container. Title of Form Designer is changed to "/Panel1".
  1. Invoke Design This Container on JPanel
    1. Open existing form file from mounted filesystem.
    2. Select component JPanel from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select jPanel1 in Form Designer and invoke popup menu.
    5. Push Design This Container.
    • EXPECTED RESULT: Form Designer displays only jPanel1 as the whole design container. Title of Form Designer is changed to "/jPanel1".
  1. Invoke Design This Container on JDialog (from Other Components)
    1. Open existing form file from mounted filesystem.
    2. Select component JDialog from Component Palette category Swing(Other).
    3. Click into Form Designer.
    4. Select jDialog1 in Component Inspector and invoke popup menu.
    5. Push Design This Container.
    • EXPECTED RESULT: Form Designer displays only jDialog1 as the whole design container. Title of Form Designer is changed to "/jDialog1".
  1. Invoke Design Top Container on JScrollPane
    1. Open existing form file from mounted filesystem.
    2. Select component JScrollPane from Component Palette category Swing(Other).
    3. Click into Form Designer.
    4. Select jScrollPane1 in Component Inspector and doubleclick.
    5. Push Design This Container.
    • EXPECTED RESULT: Form Designer displays top container as the whole design container. Title of Form Designer is changed to "".
  1. Invoke Design Parent Container
    1. Create new JFrame and insert JPanel
    2. Place JButton into jPanel1
    3. Select jButton1 in design and invoke contextual menu
    4. Choose action Design Parent -> jPanel1
    • EXPECTED RESULT: Form Designer displays jPanel1 container as the whole design container. Title of Form Designer is changed to " jPanel1".
  1. Invoke Design Parent Container
    1. Have opened JFrame from previous test case
    2. Do double click on jPanel1 node in inspector
    3. Select jButton1 node in inspector and invoke contextual menu
    4. Choose action Design Parent -> Top Parent
    • EXPECTED RESULT: Action "Design Parent -> jPanel1" should be disabled. Form Designer displays JFrame container as the whole design container. Title of Form Designer is changed to "NewJFrame.java".
  1. Invoke Goto Source on JButton
    1. Open existing form file from mounted filesystem.
    2. Select component JButton from Component Palette category Swing.
    3. Click into Form Designer.
    4. Select jButton1 in Form Designer and invoke popup menu.
    5. Push Goto Source.
    • EXPECTED RESULT: Source Editor become active.
  1. Change order of tabs in JTabbedPane
    1. Open existing form file with three tabs(button1,button2 and button3).
    2. Select jTabbedPane1 in Form Designer and invoke popup menu.
    3. Push Change Order.
    4. In opened Change Order dialog select button1 and push Move Down.
    5. Select button3 and push Move Up.
    • EXPECTED RESULT: Order of components under jTabbedPane1 node in Component Inspector is changed, appropriate code is regenerated and Form Designer is repainted.
  1. Add JPopupMenu by Add From Palette
    1. Open existing form file from mounted filesystem.
    2. Invoke popup menu in Form Designer.
    3. Push Add From Palette -> Swing -> JPopupMenu.
    • EXPECTED RESULT: Code for added JPopupMenu is generated (see AddJPopupMenu.java). jPopupMenu1 is selected in Component Inspector and appropriate properties are displayed in Properties Sheet under Component Tree.
  1. Add Button by Add From Palette on Panel
    1. Open existing form file from mounted filesystem.
    2. Select component Panel from Component Palette category AWT.
    3. Click into Form Designer.
    4. Invoke popup menu on panel1 in Form Designer.
    5. Push Add From Palette -> AWT -> Button.
    • EXPECTED RESULT: Code for added Button is generated (see AddButtontoPanel.java). button1 is selected in Component Inspector and appropriate properties are displayed in Properties Sheet under Component Tree.
  1. Alignment of components in design
    1. Create new JFrame and insert two components into it - JButton and JTextArea
    2. Arrange this components in way that jButton1 is under jTextArea1
    3. Select both components in design and invoke contextual menu
    4. Choose action Align -> Left to Column
    • EXPECTED RESULT: jButton1 should be moved and aligned to left edge of jTextArea1
  1. Alignment of components in design
    1. Have JFrame from previous test case
    2. Select both components in design and invoke contextual menu
    3. Choose action Align -> Right to Column
    • EXPECTED RESULT: jButton1 should be moved and aligned to right edge of jTextArea1
  1. Alignment of components in design
    1. Have JFrame from previous test case
    2. Select both components in design and invoke contextual menu
    3. Choose action Align -> Center to Column
    • EXPECTED RESULT: jButton1 should be moved and aligned to the center of bottom edge of jTextArea1
  1. Alignment of components in design
    1. Have JFrame from previous test case
    2. Move jButton1 next to jTextArea1 to it's right side
    3. Choose action Align -> Top to Row
    • EXPECTED RESULT: jButton1 should be moved and aligned to upper edge of jTextArea1
  1. Alignment of components in design
    1. Have JFrame from previous test case
    2. Move jButton1 next to jTextArea1 to it's right side
    3. Choose action Align -> Botton to Row
    • EXPECTED RESULT: jButton1 should be moved and aligned to botton edge of jTextArea1
  1. Alignment of components in design
    1. Have JFrame from previous test case
    2. Move jButton1 next to jTextArea1 to it's right side
    3. Choose action Align -> Center to Row
    • EXPECTED RESULT: jButton1 should be moved and aligned to the middle of right vertical edge of jTextArea1


Test suite: GridBag Customizer test

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

  1. Set properties: change values in property sheet
    1. Open existing JFrame file from mounted filesystem.
    2. Set GridBagLayout.
    3. Select JFrame's Layout node in Component Inspector.
    4. Push Customize from Property sheet.
    5. Select jButton1.
    6. Change property Grid X = 2.
    7. Change property Grid Y = 2.
    8. Change property Grid Width = Remainder.
    9. Change property Grid Height = Relative.
    10. Change property Fill = Horizontal.
    11. Change property Internal Padding X = 3.
    12. Change property Internal Padding Y = 4.
    13. Change property Insets = 1,1,1,1.
    14. Change property Anchor = North.
    15. Change property Weight X = 0.3.
    16. Change property Weight Y = 0.2.
    • EXPECTED RESULT: In GUI part are selected toggle buttons : Anchor-North, Fill-Horizontal, Horizontal Remainder. Code is generated (see GBL_by_sheet.java).
  1. Set properties: change values by visual development
    1. Open existing JFrame file from mounted filesystem.
    2. Set GridBagLayout.
    3. Select JFrame's Layout node in Component Inspector.
    4. Push Customize from Property sheet.
    5. Select jLabel1.
    6. Push Grid Size Vertical +1 3x.
    7. Push Grid Size Horizontal +1 2x.
    8. Push Fill Horizontal and Vertical.
    9. Push I-Padding Horizontal +1 1x.
    10. Push I-Padding Vertical +1 4x.
    11. Push Insets All +1.
    12. Push Anchor South.
    13. Move jButton1 to position 3,3.
    14. Move jLabel1 to position 1,5.
    • EXPECTED RESULT: Code is generated (see GBL_by_visual.java).


Test suite: Performance

Purpose: In Netbeans 3.4 is improved performance for multiple actions.
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g MyJFrame).

  1. Performance - copy
    1. Add JPanel1,JPanel2 into form.
    2. Add 10 JButoons into JPanel1.
    3. Select all JButtons.
    4. Copy components to JPanel2.
    • EXPECTED RESULT: Copying of components is performed in one stroke.
  1. Performance - undo/redo
    1. Add JPanel1,JPanel2 into form.
    2. Add 10 JButoons into JPanel1.
    3. Select all JButtons.
    4. Move components to JPanel2.
    5. Copy components to JPanel1.
    6. Push undo, undo, redo, redo.
    • EXPECTED RESULT: Undo and redo is always performed in one stroke.
  1. Performance - move
    1. Add JPanel1,JPanel2 into form.
    2. Add 10 JButoons into JPanel1.
    3. Select all JButtons.
    4. Move components to JPanel2.
    • EXPECTED RESULT: Move of components is performed in one stroke.
  1. Performance - delete
    1. Add 10 JButoons into form.
    2. Select all JButtons.
    3. Delete components.
    • EXPECTED RESULT: Delete of components is performed in one stroke.
  1. Performance - cut and paste
    1. Add JPanel1,JPanel2 into form.
    2. Add 10 JButoons into JPanel1.
    3. Select all JButtons.
    4. Cut components and paste them into JPanel2.
    • EXPECTED RESULT: Move of components is performed in one stroke.
  1. Performance - change properties
    1. Add 10 JButoons into form.
    2. Select all JButtons.
    3. Change properies: background, text, size.
    • EXPECTED RESULT: Changing of properties is performed in one stroke.


Test suite: Undo/Redo

Purpose: Test undo/redo functionality.
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g MyJFrame).

  1. Undo/redo - test of components
    1. Layout - Change Layout to AbsoluteLayout.
    2. Add - Add two JPanels, add several JButtons and other components to JPanel1,JPanel2,top container.
    3. Layout - Change Layout in JPanel1 to GridBagLayout.
    4. Resize, move - resize and move JPanel1, JPanel2.
    5. Move - move JButtons from one Panel to second Panel and vice versa.
    6. Copy - copy JButtons between Panels and top container.
    7. Delete - delete JButton.
    8. Cut and paste - cut and paste components from one JPanel to second.
    9. Change properties - change properties (Background Color, text).
    10. Events - add events.
    11. Make changes via ComponentInspector (move, change order, delete, copy).
    12. Undo - undo all changes.

Redo - redo all changes.


    1. Undo/redo - undo and redo all changes sever
    • EXPECTED RESULT: Undo and redo all changes perform correctly.
  1. Undo/redo - work with two FormEditors
    1. Create JForm1,JForm2.
    2. Add JButton to JForm1.
    3. Cut and paste JButton to JForm2.
    4. Push undo in JForm1.
    • EXPECTED RESULT: JButton is in both forms.
  1. Undo/redo - events
    1. Add JButton.
    2. Add event actionPerformed.
    3. Type in editor code.
    4. Push undo and redo.
    • EXPECTED RESULT: Typed text is in editor.


Test suite: Usability

Purpose: Test of several features for better usability.
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g MyJFrame).

  1. Multi-selection, interval multi selection
    1. Add several components to form.
    2. Try multi-selection (Ctrl + Mouse).
    3. Try interval selection (Shift + Mouse).
    • EXPECTED RESULT: Components are selected properly.
  1. Multi-selection, interval multi selection
    1. Add JPanel1, add tw Components to form, add tw component to JPanel1.
    2. Change Layout to AbsoluteLayout.
    3. Try select with mouse (Shift + drag mouse) region with Component on form and with JPanel.
    4. Try select with mouse (Shift + drag mouse) region without Component on form and with Componets in JPanel.
    • EXPECTED RESULT: Components are selected properly - always are selected components in the same container.
  1. Precise resizing of form size
    1. Create new form.
    2. Double-click on right (or bottom) border of form.
    3. In window "Set Form Designer Size" enter new size.
    • EXPECTED RESULT: Form is resized, the same value is in property sheet - tab Code Generation.


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