Visual Development Test Specification
Author: Jana Maleckova, Jaromir Uhrik
Version: 6.1
Last update:2008/01/30
Introduction: This is intended as tests of Form Editor module.
Comments:
Purpose:
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new Swing and AWT forms (e.g MyJFrame and MyFrame).
- Create JMenu in JMenuBar
- Open file MyJFrame and create JMenuBar component if missing.
- Select JMenuBar and invoke pop-up menu (not above the Menu, in other words click the JMenuBar somewhere where is no text).
- Push Add Menu
- EXPECTED RESULT: Proper code is generated
- Add JMenuItem to JMenu
- Open file MyJFrame and create JMenuBar if missing (and insert a JMenu if not inserted in previous test cases).
- Select Menu (i.e. "File") in JMenuBar and invoke popup menu.
- Push Add From Palette -> Menu Item
- EXPECTED RESULT: Proper code is generated, menu and menu item is added
- Add JCheckBoxMenuItem to JMenu
- Open file MyJFrame and create JMenuBar if missing (and insert a JMenu if not inserted in previous test cases).
- Select Menu (i.e. "File") in JMenuBar and invoke popup menu.
- Push Add From Palette -> Menu Item/Checkbox
- EXPECTED RESULT: Proper code is generated
- Add JRadioButtonMenuItem to JMenu
- Open file MyJFrame and create JMenuBar if missing (and insert a JMenu if not inserted in previous test cases).
- Select Menu (i.e. "File") in JMenuBar and invoke popup menu.
- Push Add From Palette -> Menu Item/RadioButton
- EXPECTED RESULT: Proper code is generated
- Add JMenu to JMenu
- Open file MyJFrame and create JMenuBar if missing (and insert a JMenu if not inserted in previous test cases).
- Select Menu (i.e. "File") in JMenuBar and invoke popup menu.
- Push Add From Palette -> Menu
- EXPECTED RESULT: Proper code is generated
- Add JSeparator to JMenu
- Open file MyJFrame and create JMenuBar if missing (and insert a JMenu if not inserted in previous test cases).
- Select Menu (i.e. "File") in JMenuBar and invoke popup menu.
- Push Add From Palette -> Separator
- EXPECTED RESULT: Proper code is generated
- Create JMenu in JPopupMenu
- Open file MyJFrame and create JPopupMenu component if missing.
- Select JPopupMenu in the Inspector window and invoke popup menu.
- Push Add From Palette -> Menu
- EXPECTED RESULT: Proper code is generated
- Add JMenuItem to JPopupMenu
- Open file MyJFrame and create JPopupMenu component if missing.
- Select JPopupMenu in the Inspector window and invoke popup menu.
- Push Add From Palette -> Menu Item
- EXPECTED RESULT: Proper code is generated
- Add JCheckBoxMenuItem to JPopupMenu
- Open file MyJFrame and create JPopupMenu component if missing.
- Select JPopupMenu in the Inspector window and invoke popup menu.
- Push Add From Palette -> Menu Item/Checkbox
- EXPECTED RESULT: Proper code is generated
- Add JRadioButtonMenuItem to JPopupMenu
- Open file MyJFrame and create JPopupMenu component if missing.
- Select JPopupMenu in the Inspector window and invoke popup menu.
- Push Add From Palette -> Menu Item/RadioButton
- EXPECTED RESULT: Proper code is generated
- Add JSeparator to JPopupMenu
- Open file MyJFrame and create JPopupMenu component if missing.
- Select JPopupMenu in the Inspector window and invoke popup menu.
- Push Add From Palette -> Separator
- EXPECTED RESULT: Proper code is generated
- Create Menu in MenuBar
- Open file MyFrame and create Menu if missing.
- Select MenuBar and invoke popup menu.
- Push Add Menu (or Add > Menu if you right-click above some menu, i.e. "File" or "Menu")
- EXPECTED RESULT: Proper code is generated
- Add MenuItem to Menu
- Open file MyFrame and create Menu if missing.
- Select Menu and invoke popup menu.
- Push Add > MenuItem
- EXPECTED RESULT: Proper code is generated
- Add CheckboxMenuItem to Menu
- Open file MyFrame and create Menu if missing.
- Select Menu and invoke popup menu.
- Push Add > CheckboxMenuItem
- EXPECTED RESULT: Proper code is generated
- Add Menu to Menu
- Open file MyFrame and create Menu if missing.
- Select Menu and invoke popup menu.
- Push Add > Menu
- EXPECTED RESULT: Proper code is generated
- Add Separator to Menu
- Open file MyFrame and create Menu if missing.
- Select Menu and invoke popup menu.
- Push Add > Separator
- EXPECTED RESULT: Proper code is generated
- Create Menu in PopupMenu
- Open file MyFrame and create PopupMenu if missing.
- Select PopupMenu in the Inspector and invoke popup menu.
- Push Add > Menu
- EXPECTED RESULT: Proper code is generated
- Add MenuItem to PopupMenu
- Open file MyFrame and create PopupMenu if missing.
- Select PopupMenu in the Inspector and invoke popup menu.
- Push Add > MenuItem
- EXPECTED RESULT: Proper code is generated
- Add CheckBoxMenuItem to PopupMenu
- Open file MyFrame and create PopupMenu if missing.
- Select PopupMenu in the Inspector and invoke popup menu.
- Push Add > CheckboxMenuItem
- EXPECTED RESULT: Proper code is generated
- Add Separator to PopupMenu
- Open file MyFrame and create PopupMenu if missing.
- Select PopupMenu in the Inspector and invoke popup menu.
- 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).
- 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 MyForm, Right-click the JForm in the Inspector.
- 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 Containers.
- Select component jPanel1 in Form Designer.
- Invoke popup menu and push Add From Palette -> Swing Controls -> Text Area.
- 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 Containers.
- Select component jTabbedPane1 in Form Designer.
- Invoke popup menu and push Add From Palette -> Swing Containers -> Panel.
- 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 Containers.
- Select component jScrollPane1 in Form Designer.
- Invoke popup menu and push Add From Palette -> Swing Controls -> Table.
- 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 Containers.
- Select component jSplitPane1 in Form Designer.
- Invoke popup menu and push Add From Palette -> Swing Control -> Button.
- Select component jSplitPane1 in Form Designer.
- Invoke popup menu and push Add From Palette -> Swing Container -> Panel.
- 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 Containers.
- Select component JjoolBar1 in Form Designer.
- Invoke popup menu and push Add From Palette -> Swing Controls -> ToggleButton.
- 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 Containers.
- Select component jInternalFrame1 in Form Designer.
- Invoke popup menu and push Add From Palette -> Swing Controls -> Tree.
- 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 Containers.
- Select component jDesktopPane1 in Form Designer.
- Invoke popup menu and push Add From Palette -> Swing Containers -> 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 Controls.
- 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(javax.swing.BorderFactory.createEmptyBorder(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 (depends on parameters you set):
> jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); // or...
jLabel1.setBorder(new javax.swing.border.LineBorder(java.awt.Color(0, 0, 0), 1, false));
- 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(javax.swing.BorderFactory.createTitledBorder(""));
- 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()); or jTextField1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
- 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()); or jSplitPane.setBorder(javax.swing.BorderFactory.createCompoundBorder());
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 Conainers.
- 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 Windows.
- 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 Containers.
- 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 "/jScrollPane1".
- 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 Code Customizer on JButton
- Open existing form file from mounted filesystem.
- Select component JButton from Component Palette category Swing Controls.
- Click into Form Designer.
- Select jButton1 in Form Designer and invoke popup menu.
- Push Customize Code
- EXPECTED RESULT: Code Customizer 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 (doesn't work, see enh. 120173)
- Open existing form file from mounted filesystem.
- Invoke popup menu in Form Designer.
- Push Add From Palette -> Swing Menus -> Popup Menu.
- EXPECTED RESULT: Code for added JPopupMenu is generated. 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. 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
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: Proper code is generated.
- Set properties: change values by visual development
- Open existing JFrame file from mounted filesystem (there must be some components, for example JLabel and JButton in the JFrame).
- Set GridBagLayout (in Inspector window).
- Select JFrame's Layout node in Inspector.
- Push Customize from the pop-up menu -> a dialog appears.
- Select jLabel1 in the right preview pane, and focus on the left pane (there are buttons).
- Push Grid Size vertical "+" button 3x.
- Push Grid Size horizontal "+" button 2x.
- Push Fill horizontal and vertical buttons.
- Push I-Padding horizontal "+" button 1x.
- Push I-Padding vertical "+" button 4x.
- Push all Insets "+" buttons several times.
- Push south Anchor button.
- Move jButton1 to position 3,3.
- Move jLabel1 to position 1,5.
- EXPECTED RESULT: Code is properly generated.
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 two JPanels (jPanel1, jPanel2) into the form.
- Add 10 JButons 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
- 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.
Purpose: To test if buttons in a scope of Button Group are correctly visualized
Setup: Start IDE with clear userdir. Create new project, Java Application (e.g. MyApplication) and create a new form (e.g MyJFrame).
- Visualization of jCheckBoxes
- Place e.g. 3 jCheckBoxes in Frame
- Place component jButtonGroup
- Select all jCheckBoxes in Frame
- Go to Properties and choose the name of jButtonGroup from combo to ButtonGroup property
- EXPECTED RESULT: All jCheckBoxes should be connected with line
- Moving of controls which are the members of one jButtonGroup
- use previous testcase and try to move all jCheckBoxes in a scope of Frame
- EXPECTED RESULT: Visualization should not disappear
- Visualization of jRadioButtons
- Place e.g. 3 jRadioButtons in Frame
- Place component jButtonGroup
- Select all jRadioButtonsin Frame
- Go to Properties and choose the name of jButtonGroup from combo to ButtonGroup property
- EXPECTED RESULT: All jRadioButtons should be connected with line
- Test Controls in a scope of jButtonGroup in different containers
- Create new Frame and place there two jPanels
- Place jRadioButton in each jPanel
- Place jButtonGroup
- Assign jRadioButtons to one jButtonGroup
- Do double click on one of the Panels
- EXPECTED RESULT: After double click, jPanel should be opened in design and no exception is thrown
- Test various alignment of controls towards each other when they are in jButtonGroup
- Create new Frame
- Place 2 jRadioButtons into Frame
- Place jButtonGroup
- Assign jRadioButtons to one jButtonGroup
- Select both controls and test all Alignment Tools from the top of Designer
- EXPECTED RESULT: After double click, jPanel should be opened in design and no exception is thrown
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 two components to form, add two components to JPanel1.
- Change Layout to AbsoluteLayout.
- Try to select a region (Shift + drag mouse) with some component on form and with JPanel.
- Try to select a region without component on form and with componets in JPanel.
- EXPECTED RESULT: Components are selected properly - always are selected components in the correct 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.