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:
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).
- Add JLabel and Label into JFrame
- Create new JFrame.
- Select component JLabel from Component Palette category Swing.
- Click into Form Designer.
- Select component Label from Component Palette category AWT.
- Click into Form Designer.
- EXPECTED RESULT: Code for added JLabel and Label is generated.
- Add JPanel and Canvas into Frame
- Create new Frame.
- Select component JPanel from Component Palette category Swing.
- Click into Form Designer.
- Select component Canvas from Component Palette category AWT.
- Click into Form Designer.
- EXPECTED RESULT: Code for added JPanel and Canvas is generated.
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).
- Move components in one container
- Add three buttons to JForm.
- Set Layout to FlowLayout and change order of components.
- Set Layout to BorderLayout and change direction for components.
- Set Layout to GridLayout and change order of components, change number of columns and rows to 2 and repeat test.
- Set Layout to GridBagLayout and try change position - it is without success.
- Set Layout to CardLayout and try change position - it is without success.
- Set Layout to BoxLayout and change order of components. Change Axis to Y Axis and repeat.
- Set Layout to AbsoluteLayout and change position for components.
- Change Grid X, Grid Y, Apply Grid to Position in options (Options, Editing, Form Editor Settings) and change position of components with new properties.
- Set Layout to NullLayout and change position for components.
- For every layout try select two components and change position for both components.
- EXPECTED RESULT: Properly generated code.
- Move components in more containers
- Add three JPanels to form, JPanel1, JPanel2, JPanel3.
- Remove JPanel2 to JPanel3.
- Add at least two buttons to all containers (including JForm).
- Move components from one container to another container, try all posibilities.
- Select two components from one container and move them.
- Select two components from different containers and move them to another container, to the same container.
- Remove all container with components into other container.
- EXPECTED RESULT: Properly generated code.
- Resize components
- Add components to form.
- Try set all Layout (except AbsoluteLayout and NullLayout) and try resize components - without success.
- Set AbsoluteLayout.
- Resize components and check generate code - for size is used AbsoluteConstraints method.
- EXPECTED RESULT: Code is generated with AbsoluteConstraints method.
- Set the same width size for more components
- Create new JFrame
- Invoke contextual menu on JFrame in design
- Choose action Add From Palette -> Swing Controls -> JButton
- Do it again
- Change text of jButton1 to "OK"
- Change text of jButton2 to "Cancel"
- Select both buttons by mouse with keeping ctrl key
- 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.
- Set the same height size for more components
- Create new JFrame
- Invoke contextual menu on JFrame in design
- Choose action Add From Palette -> Swing Controls -> JButton
- Do it again
- Change font size of text on jButton1 to e.g. 24 px
- Select both buttons by mouse with keeping ctrl key
- 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.
Purpose:
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g MyJFrame).
- Add JTextArea into JPanel
- Create new JFrame.
- Select component JPanel from Component Palette category Swing.
- Select component jPanel1 in Form Designer.
- 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.
- Add JPanel into JTabbedPane
- Create new JFrame.
- Select component JTabbedPane from Component Palette category Swing.
- Select component jTabbedPane1 in Form Designer.
- 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.
- Add JTable into JScrollPane
- Create new JFrame.
- Select component JScrollPane from Component Palette category Swing.
- Select component jScrollPane1 in Form Designer.
- 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.
- Add JPanel into JSplitPane
- Create new JFrame.
- Select component JSplitPane from Component Palette category Swing(Other).
- Select component jSplitPane1 in Form Designer.
- Invoke popup menu and push Add From Palette -> Swing -> JButton.
- Select component jSplitPane1 in Form Designer.
- 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.
- Add JToggleButton into JToolBar
- Create new JFrame.
- Select component JToolBar from Component Palette category Swing(Other).
- Select component JjoolBar1 in Form Designer.
- 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.
- Add JTree into JInternalFrame
- Create new JFrame.
- Select component JInternalFrame from Component Palette category Swing(Other).
- Select component jInternalFrame1 in Form Designer.
- 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.
- Add JInternalFrame into JDesktopPane
- Create new JFrame.
- Select component JDesktopPane from Component Palette category Swing(Other).
- Select component jDesktopPane1 in Form Designer.
- 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).
- Add TextArea into ScrollPane
- Create new Frame.
- Select component ScrollPane from Component Palette category AWT.
- Select component scrollPane1 in Form Designer.
- 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.
- Add Canvas into Panel
- Create new Frame.
- Select component Panel from Component Palette category AWT.
- Select component panel1 in Form Designer.
- 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).
- In-place editing on JLabel
- Create new JFrame.
- Select component JLabel from Component Palette category Swing.
- Select component jLabel1 in Form Designer.
- Press SPACE.
- Type "My Text" into shown in-place editor (textfield).
- EXPECTED RESULT: Generated code: jLabel1.setText("My Text");
- In-place editing on JButton
- Create new JFrame.
- Select component JButton from Component Palette category Swing.
- Select component jButton1 in Form Designer.
- Press SPACE.
- Type "My Text" into shown in-place editor (textfield).
- EXPECTED RESULT: Generated code: jButton1.setText("My Text");
- In-place editing on JToggleButton
- Create new JFrame.
- Select component JToggleButton from Component Palette category Swing.
- Select component jToggleButton1 in Form Designer.
- Press SPACE.
- Type "My Text" into shown in-place editor (textfield).
- EXPECTED RESULT: Generated code: jToggleButton1.setText("My Text");
- In-place editing on JCheckBox
- Create new JFrame.
- Select component JCheckBox from Component Palette category Swing.
- Select component jCheckBox1 in Form Designer.
- Press SPACE.
- Type "My Text" into shown in-place editor (textfield).
- EXPECTED RESULT: Generated code: jCheckBox1.setText("My Text");
- In-place editing on JRadioButton
- Create new JFrame.
- Select component JRadioButton from Component Palette category Swing.
- Select component jRadioButton1 in Form Designer.
- Press SPACE.
- Type "My Text" into shown in-place editor (textfield).
- EXPECTED RESULT: Generated code: jRadioButton1.setText("My Text");
- In-place editing on JMenu
- Create new JFrame.
- Select component JMenuBar from Component Palette category Swing.
- Select component jMenu1 in Form Designer.
- Press SPACE.
- Type "My Text" into shown in-place editor (textfield).
- EXPECTED RESULT: Generated code: jMenu1.setText("My Text");
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).
- Set EmptyBorder for JButton
- Open existing form file from mounted filesystem..
- Select component JButton from Component Palette category Swing.
- Click into Form Designer.
- Set border-property to EmptyBorder.
- 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)));
- Set LineBorder for JLabel
-
Open existing form file from mounted filesystem..
- Select component JLabel from Component Palette category Swing Controls.
- Click into Form Designer.
- Set border-property to LineBorder.
- 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)));
- Set MatteBorder for JRadioButton
- Open existing form file from mounted filesystem..
- Select component JRadioButton from Component Palette category Swing Controls.
- Click into Form Designer.
- Set border-property to MateBorder.
- Click on jRadioButton1 in Form Designer.
- EXPECTED RESULT: Code for new border is generated: jRadioButton1.setBorder(new javax.swing.border.MatteBorder(null));
- Set TitledBorder for JPanel
-
Open existing form file from mounted filesystem..
- Select component JPanel from Component Palette category Swing Containers.
- Click into Form Designer.
- Set border-property to TitledBorder.
- Click on jPanel1 in Form Designer.
- EXPECTED RESULT: Code for new border is generated: jPanel1.setBorder(new javax.swing.border.TitledBorder(""));
- Set EtchedBorder for JTextField
-
Open existing form file from mounted filesystem..
- Select component JTextField from Component Palette category Swing Controls.
- Click into Form Designer.
- Set border-property to EtchedBorder.
- Click on jTextField1 in Form Designer.
- EXPECTED RESULT: Code for new border is generated: jTextField1.setBorder(new javax.swing.border.EtchedBorder());
- Set BevelBorder for JTextArea
-
Open existing form file from mounted filesystem..
- Select component JTextArea from Component Palette category Swing Controls.
- Click into Form Designer.
- Set border-property to BevelBorder.
- 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));
- Set SoftBevelBorder for JCheckBox
-
Open existing form file from mounted filesystem..
- Select component JCheckBox from Component Palette category Swing Controls.
- Click into Form Designer.
- Set border-property to SoftBevelBorder.
- 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));
- Set CompoundBorder for JSplitPane
-
Open existing form file from mounted filesystem..
- Select component JSplitPane from Component Palette category Swing Containers.
- Click into Form Designer.
- Set border-property to CompoundBorder.
- 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).
- Invoke Design This Container on Panel
- Open existing form file from mounted filesystem.
- Select component Panel from Component Palette category AWT.
- Click into Form Designer.
- Select panel1 in Form Designer and invoke popup menu.
- Push Design This Container.
- EXPECTED RESULT: Form Designer displays only panel1 as the whole design container. Title of Form Designer is changed to "/Panel1".
- Invoke Design This Container on JPanel
- Open existing form file from mounted filesystem.
- Select component JPanel from Component Palette category Swing.
- Click into Form Designer.
- Select jPanel1 in Form Designer and invoke popup menu.
- Push Design This Container.
- EXPECTED RESULT: Form Designer displays only jPanel1 as the whole design container. Title of Form Designer is changed to "/jPanel1".
- Invoke Design This Container on JDialog (from Other Components)
- Open existing form file from mounted filesystem.
- Select component JDialog from Component Palette category Swing(Other).
- Click into Form Designer.
- Select jDialog1 in Component Inspector and invoke popup menu.
- Push Design This Container.
- EXPECTED RESULT: Form Designer displays only jDialog1 as the whole design container. Title of Form Designer is changed to "/jDialog1".
- Invoke Design Top Container on JScrollPane
- Open existing form file from mounted filesystem.
- Select component JScrollPane from Component Palette category Swing(Other).
- Click into Form Designer.
- Select jScrollPane1 in Component Inspector and doubleclick.
- Push Design This Container.
- EXPECTED RESULT: Form Designer displays top container as the whole design container. Title of Form Designer is changed to "".
- Invoke Design Parent Container
- Create new JFrame and insert JPanel
- Place JButton into jPanel1
- Select jButton1 in design and invoke contextual menu
- 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".
- Invoke Design Parent Container
- Have opened JFrame from previous test case
- Do double click on jPanel1 node in inspector
- Select jButton1 node in inspector and invoke contextual menu
- 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".
- Invoke Goto Source on JButton
- Open existing form file from mounted filesystem.
- Select component JButton from Component Palette category Swing.
- Click into Form Designer.
- Select jButton1 in Form Designer and invoke popup menu.
- Push Goto Source.
- EXPECTED RESULT: Source Editor become active.
- Change order of tabs in JTabbedPane
- Open existing form file with three tabs(button1,button2 and button3).
- Select jTabbedPane1 in Form Designer and invoke popup menu.
- Push Change Order.
- In opened Change Order dialog select button1 and push Move Down.
- 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.
- Add JPopupMenu by Add From Palette
- Open existing form file from mounted filesystem.
- Invoke popup menu in Form Designer.
- 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.
- Add Button by Add From Palette on Panel
- Open existing form file from mounted filesystem.
- Select component Panel from Component Palette category AWT.
- Click into Form Designer.
- Invoke popup menu on panel1 in Form Designer.
- 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.
- Alignment of components in design
- Create new JFrame and insert two components into it - JButton and JTextArea
- Arrange this components in way that jButton1 is under jTextArea1
- Select both components in design and invoke contextual menu
- Choose action Align -> Left to Column
- EXPECTED RESULT: jButton1 should be moved and aligned to left edge of jTextArea1
- Alignment of components in design
- Have JFrame from previous test case
- Select both components in design and invoke contextual menu
- Choose action Align -> Right to Column
- EXPECTED RESULT: jButton1 should be moved and aligned to right edge of jTextArea1
- Alignment of components in design
- Have JFrame from previous test case
- Select both components in design and invoke contextual menu
- Choose action Align -> Center to Column
- EXPECTED RESULT: jButton1 should be moved and aligned to the center of bottom edge of jTextArea1
- Alignment of components in design
- Have JFrame from previous test case
- Move jButton1 next to jTextArea1 to it's right side
- Choose action Align -> Top to Row
- EXPECTED RESULT: jButton1 should be moved and aligned to upper edge of jTextArea1
- Alignment of components in design
- Have JFrame from previous test case
- Move jButton1 next to jTextArea1 to it's right side
- Choose action Align -> Botton to Row
- EXPECTED RESULT: jButton1 should be moved and aligned to botton edge of jTextArea1
- Alignment of components in design
- Have JFrame from previous test case
- Move jButton1 next to jTextArea1 to it's right side
- 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).
- Set properties: change values in property sheet
- Open existing JFrame file from mounted filesystem.
- Set GridBagLayout.
- Select JFrame's Layout node in Component Inspector.
- Push Customize from Property sheet.
- Select jButton1.
- Change property Grid X = 2.
- Change property Grid Y = 2.
- Change property Grid Width = Remainder.
- Change property Grid Height = Relative.
- Change property Fill = Horizontal.
- Change property Internal Padding X = 3.
- Change property Internal Padding Y = 4.
- Change property Insets = 1,1,1,1.
- Change property Anchor = North.
- Change property Weight X = 0.3.
- 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).
- Set properties: change values by visual development
- Open existing JFrame file from mounted filesystem.
- Set GridBagLayout.
- Select JFrame's Layout node in Component Inspector.
- Push Customize from Property sheet.
- Select jLabel1.
- Push Grid Size Vertical +1 3x.
- Push Grid Size Horizontal +1 2x.
- Push Fill Horizontal and Vertical.
- Push I-Padding Horizontal +1 1x.
- Push I-Padding Vertical +1 4x.
- Push Insets All +1.
- Push Anchor South.
- Move jButton1 to position 3,3.
- Move jLabel1 to position 1,5.
- EXPECTED RESULT: Code is generated (see GBL_by_visual.java).
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).
- Performance - copy
- Add JPanel1,JPanel2 into form.
- Add 10 JButoons into JPanel1.
- Select all JButtons.
- Copy components to JPanel2.
- EXPECTED RESULT: Copying of components is performed in one stroke.
- Performance - undo/redo
- Add JPanel1,JPanel2 into form.
- Add 10 JButoons into JPanel1.
- Select all JButtons.
- Move components to JPanel2.
- Copy components to JPanel1.
- Push undo, undo, redo, redo.
- EXPECTED RESULT: Undo and redo is always performed in one stroke.
- Performance - move
- Add JPanel1,JPanel2 into form.
- Add 10 JButoons into JPanel1.
- Select all JButtons.
- Move components to JPanel2.
- EXPECTED RESULT: Move of components is performed in one stroke.
- Performance - delete
- Add 10 JButoons into form.
- Select all JButtons.
- Delete components.
- EXPECTED RESULT: Delete of components is performed in one stroke.
- Performance - cut and paste
- Add JPanel1,JPanel2 into form.
- Add 10 JButoons into JPanel1.
- Select all JButtons.
- Cut components and paste them into JPanel2.
- EXPECTED RESULT: Move of components is performed in one stroke.
- Performance - change properties
- Add 10 JButoons into form.
- Select all JButtons.
- 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).
- Undo/redo - test of components
- Layout - Change Layout to AbsoluteLayout.
- Add - Add two JPanels, add several JButtons and other components to JPanel1,JPanel2,top container.
- Layout - Change Layout in JPanel1 to GridBagLayout.
- Resize, move - resize and move JPanel1, JPanel2.
- Move - move JButtons from one Panel to second Panel and vice versa.
- Copy - copy JButtons between Panels and top container.
- Delete - delete JButton.
- Cut and paste - cut and paste components from one JPanel to second.
- Change properties - change properties (Background Color, text).
- Events - add events.
- Make changes via ComponentInspector (move, change order, delete, copy).
- Undo - undo all changes.
-
Redo - redo all changes.
- Undo/redo - undo and redo all changes sever
- EXPECTED RESULT: Undo and redo all changes perform correctly.
- Undo/redo - work with two FormEditors
- Create JForm1,JForm2.
- Add JButton to JForm1.
- Cut and paste JButton to JForm2.
- Push undo in JForm1.
- EXPECTED RESULT: JButton is in both forms.
- Undo/redo - events
- Add JButton.
- Add event actionPerformed.
- Type in editor code.
- 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).
- Multi-selection, interval multi selection
- Add several components to form.
- Try multi-selection (Ctrl + Mouse).
- Try interval selection (Shift + Mouse).
- EXPECTED RESULT: Components are selected properly.
- Multi-selection, interval multi selection
- Add JPanel1, add tw Components to form, add tw component to JPanel1.
- Change Layout to AbsoluteLayout.
- Try select with mouse (Shift + drag mouse) region with Component on form and with JPanel.
- 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.
- Precise resizing of form size
- Create new form.
- Double-click on right (or bottom) border of form.
- In window "Set Form Designer Size" enter new size.
- EXPECTED RESULT: Form is resized, the same value is in property sheet - tab Code Generation.