TS 65 EditorOptions

Editor - Options Test Specification

Author: Max Sauer
Last update: 2008/10/15
Introduction: This test specification should describe steps needed to briefly test functionality of Options Dialog.
Comments: Open any J2SE project first.

Contents


Test suite: Editor Settings

Setup: Invoke Tools>Options from the main menu and click Editor File:Optionsdialogeditor TS 65 EditorOptions.png? (preview) button in the top of the Options dialog that shows up.
Note: As a part of a testing, focus on appearance of individual tabs of Options dialog while executing following test cases (colors of panels, unreadable texts, ...).

  1. Editor - General tab (Code Folding)
    1. Select "General" tab
    2. Turn off Code Folding.
    3. Confirm OD.
    4. Try various "Collapse by default" settings.
    • EXPECTED RESULT: Verify that changes were successfully propagated.
  1. Editor - General tab (Code completion settings)
    1. Select "General" tab
    2. Try various CC settings and combinations.
    3. Confirm OD.
    4. Make some additional changes.
    5. Cancel OD.
    • EXPECTED RESULT: Use CC in opened source file and verify that it behaves correctly, with respect to changes made in step 1. Verify that changes have been canceled in step 4.
  1. Editor - Formatting tab
    1. Select "Formating" tab
    2. Change some formatting settings for all languages ("All Languages" must be selected in Language combobox)
    3. Confirm OD
    4. Verify the change made in previous step was correctly propagated
    5. Reopen formatting settings
    6. Select "Java" in the Language combobox
    7. Change some Java formatting settings from all categories (use Category combobox) - to override settings applying to all languages, you need to check "Override Global Options" checkbox
    8. Confirm OD
    9. Verify the change made in previous step was correctly propagated
    • EXPECTED RESULT: If you invoke "Format" action (Alt+Shift+F) inside the editor, Java code must be reformatted so that it honors formatting settings. Checking "Override Global Settings" checkbox causes general options (for all languages) to be overridden by more specific options (options specific for Java). Preview inside the Options dialog must demonstrate how formatting settings will look in editor after you confirm them.
  1. Editor - Mark Occurrences tab
    1. Select "Mark Occurrences" tab, make sure "Java" is selected in language combobox
    2. Try to disable and enable mark occurrences, then try to set various settings for this feature
    • EXPECTED RESULT: Mark occurrences settings work as expected, for example:
      - if mark occurrences is turned on for some symbol and if caret is above the symbol in the editor, all occurrences of the symbol are highlighted.
      - if "Exit points from methods" checkbox is checked and if caret is above the return type of a method in a declaration (for example protected boo</span>
  1. Editor - Code Templates tab
    1. Select "Code Templates" tab
    2. Try to add, remove and modify a few code templates for some (at least 2) Languages from "Languages" combobox
    3. Change value of "Expand Template On" for some template
    4. Briefly check code templates work in the editor and that all changes you made took effect
    • EXPECTED RESULT: Verify that new code templates are saved, and usable in (and only in) desired editor types. Verify that changes made in code templates are persistent between IDE startups.
  1. Editor - Macros tab
    1. Select "Macros" tab
    2. Press New button in order to create a new macro.
    3. Fill in some macro name
    4. Type <tt>paste-from-clipboard in Macro Code textarea
    5. Set some shortcut to the macro (Set Shortcut button)
    6. Confirm OD
    7. Try the macro inside editor (it should perform desired action, in our case paste from clipboard).
    8. Invoke OD once again.
    9. Remove the macro by clicking Remove
    10. Confirm OD
    11. Verify that the macro is no longer available.
    • EXPECTED RESULT: Macro is functional as expected.


Test suite: Fonts and Colors Settings

Setup: Invoke Tools>Options from the main menu and click Fonts&Colors File:Optionsdialogfontsandcolors TS 65 EditorOptions.png? (preview) button in the top of the Options dialog that shows up.

  1. City Lights
    1. Switch to City Lights profile
    2. Verify that profile has been previewed
    • EXPECTED RESULT: Profile is properly previewed and selected.
  1. City Ligts modifications
    1. Make some changes to CityLights profile
    2. Do step 1. for multiple Languages/Categories
    3. Change also FG/BG, fonts and effects
    • EXPECTED RESULT: All changes should be previewed and visible immediately after OD confirmation.
  1. NetBeans Profile
    1. Switch back to 'NetBeans' profile and confirm OD.
    2. Verify that profile has been changed, and nothing became corrupted.
    3. Switch back to CityLights profile.
    4. Verify that no changes made in previous use case have been lost.
    5. Verify that all changes are persistent between IDE restarts.
    • EXPECTED RESULT: Changes are persistent with respect to profile change and restart.
  1. Highlighting tab
    1. Make some changes inside highlighting tab, both FG and BG
    2. Do this in both color profiles
    • EXPECTED RESULT: All changes were successfully applied and saved
  1. Custom colors
    1. Make some changes inside syntax and highlighting and tab, but this time change on FG/BG colors
    2. Use custom colors this time
    3. Try all three options of setting custom colors (Swatch, HSB and RGB)
    • EXPECTED RESULT: All changes were successfully applied and saved
  1. Inherited colors
    1. Return to OD and change custom colors back to 'Inherited'
    2. Verify that all color combos contain 'Inherited' element
    • EXPECTED RESULT: All color changes have been reverted.
  1. Restore settings
    1. Restore 'NetBeans' profile, confirm OD and verify that everything was rolled back.
    2. Re-invoke OD, switch to City Lights and verify that the changes you have made there were NOT reverted.
    3. Restore 'CityLights' profile, confirm OD and verify that everything was rolled back.
    • EXPECTED RESULT: Everything should be restored.
  1. Duplicate profile 1
    1. Duplicate NetBeans profile, leave the name unchanged
    • EXPECTED RESULT: This is not allowed - an error dialog should pop out.
  1. Duplicate profile 2
    1. Switch to City Lights profile and make some changes inside both Syntax and Highlighting tabs
    2. Duplicate City Lights profile, this time change the name.
    3. Verify that the changes you have made were transfered to the duplicated profile.
    4. Verify that the 'Restore' button, which is available for default profiles, has changed its label to 'Delete'.
    5. Confirm OD
    6. Re-invoke options. Make some changes to the newly created profile.
    7. Verify changes were previewed and confirm OD. Verify that changes have been propagated.
    8. Re-invoke OD and delete profile.
    • EXPECTED RESULT: All actions ended up with expected results.
  1. Annotations tab
    1. Change FG/BG/Wave underline of all elements, subsequently.
    2. Verify that changes are persistent between IDE startups.
    3. Verify that changes affect all profiles.
    • EXPECTED RESULT: All changes were saved and had expected results.


Test suite: Keymap settings

Setup: Invoke Tools>Options from the main menu and click Keymap File:Optionsdialogkeymap TS 65 EditorOptions.png? (preview) button in the top of the Options dialog that shows up.

  1. Add shortcut
    1. Open 'Project' node.
    2. Select 'Set as main project' node.
    3. Press 'Add' button.
    4. Press 'TAB' button.
    5. Verify that 'TAB' is inserted inside 'Shortcut' text field.
    6. Press Backspace.
    7. Verify that 'TAB' has been deleted from 'Shortcut' text field.
    8. Press Backspace again.
    9. Verify that 'Shortcut already assigned to Delete previous character action' label is shown inside dialog, in red font color.
    10. Verify that 'Clear' button deletes all 'Shortcut' text field content.
    11. Add 'Ctrl-Shift-M' shortcut to the 'Set as main project' action.
    12. Confirm OD.
    • EXPECTED RESULT: Verify that the shortcut is functional, ie. 'Ctrl-Shift-M' is setting currently selected project as main project.
  1. Remove shortcut
    1. Open 'Project' node.
    2. Remove the shortcut from previous use case.
    3. Confirm OD.
    • EXPECTED RESULT: Verify that the shortcut is no longer functional.
  1. Switch profile test
    1. Switch to Emacs profile and remember some if its shortcuts.
    2. Confirm OD.
    3. Verify that the Emacs profile is functional.
    4. Go to OD's Indentation tab and turn off 'Expand tabs to spaces' checkbox, confirm.
    5. Verify that Tab key indents source code in the Emacs way. (Tab strike on any caret position indents current line properly, no matter which column the caret stands on)
    6. Try some Emacs shortcuts inside editor.
    7. Add some shortcuts to Emacs profile and remove some default ones.
    • EXPECTED RESULT: Verify that all changes in SC map took desired effect.
  1. Duplicate profile test
    1. Duplicate 'Emacs' profile. Same name should be forbidden, so think out something else than 'Emacs'.
    2. Add and remove some shortcuts to the newly created profile.
    3. Confirm OD and verify profile being functional.
    4. Re-invoke OD, select 'Emacs' profile and verify the Sc's added to the newly created profile haven't been back ported to the default profiles.
    5. Restart IDE and verify your changes.
    • EXPECTED RESULT: Both new profile and newly added shortcuts were saved properly and are persistent between IDE sessions.
  1. Delete profile
    1. Verify that the Restore button has changed its label to 'Delete' for the newly created profile.
    2. Delete whole profile, using the button described in step 1).
    3. Verify that the button has changed back to 'Restore' for the default profile and that it works as expected (ie, does not delete them)
    4. Confirm OD.
    5. Re-invoke OD and verify the profile has been successfully deleted.
    • EXPECTED RESULT: Profile has been properly removed.


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