TS 71 Editor

Plain Editor Test Specification

Author:Jiri Prox
Version: 7.1
Last update:2011/10/06
Introduction:This specification cover features of plain editor. This functionality is common for all files and should work in every kind of editor. It covers basis editing, navigation, text selecting and other common utilities.

Contents

Test suite: Keyboard and Shortcuts

Purpose: Tests key shortcuts, basic manipulations with caret and modifying editor's content

  1. Typing characters in editor
    1. Open some Java file and focus the editor
    2. Try to type some text in the editor
    3. Press insert to switch from insertion to overwrite mode (on mac first map the Toggle Typing Mode keymap in NetBeans Preferences)
    4. Type some characters when overwrite mode is on
    5. Open some Java file and focus the editor
    6. Press arrow keys , , and
    7. Press arrow keys and in combination with Ctrl key (on Mac OS X use Alt key instead) (Ctrl+→ and Ctrl+←)
    8. Open some Java file and focus the editor, place caret to some line with indented text
    9. Press Home key several times (on Mac OS X use fn+left arrow)
    10. Open some Java file and focus the editor, place caret to some line with text
    11. Press End key (on Mac OS X use fn+right arrow)
    12. Press Ctrl-Up/Down several times
    13. Press PageUp/PageDown for a few times (on Mac OS X use fn+up/down arrow)
    14. Press Ctrl+Home/End a few times (on Mac OS X use cmd+up/down arrow)
    15. If you have changed some settings concerning key bindings, start IDE with a fresh userdir, open the some project and open some files in editor
    16. Try shortcuts for clipboard actions: Ctrl+C (Copy), Ctrl+X (Cut), Ctrl+V (Paste), Delete (Delete).
    17. Try shortcuts for other actions: Ctrl+F (find), Ctrl+G (Go to line), Ctrl+H (Replace) and Ctrl+F4 (Close).
    18. Open some file that has not been opened yet in the editor (from the any Java application)
    19. Try to use Undo/Redo shortcuts Ctrl-Z/Ctrl-Y, it should not be possible to do it because no changes were done previously
    20. Check if menu items for Undo/Redo (Edit|Undo and Edit|Redo) are disabled
    21. Perform any changes in the file
    22. Use the Undo action once (Ctrl+Z or a toolbar icon)
    23. Use the Redo action once (Ctrl+Y or a toolbar icon)
    24. Type another characters
    25. Use Undo as long as possible (vary between shortcut/toolbar action/main menu action), so that opened file has the same content as previously saved version
    • EXPECTED RESULT: Flag suggesting file is modified (file name is written in bold in th editor tab) disappeared after the last step and undo properly cleared all typed changes (characters). All navigation keys works as expected
  2. Other keybindings
    1. Try some of the key shortcuts defined in Tools|Options|Keymap
    2. Set a new shortcut for some action and then invoke it in editor
    3. Try to change existing shortcut to something different
    • EXPECTED RESULT: The proper action is always called. In step 3, the old shortcut does not work any more.
  3. Remove line
    1. Open some file in the editor
    2. Place caret to some non-empty line
    3. Press Shift+Delete (or Ctrl+E)
    4. Undo the last action
    • EXPECTED RESULT: Whole line is removed when you press Shift+Delete. Line deletion can be undone.

Test suite: Mouse Test

Purpose: Tests basic mouse functionality.
Setup: Opened some Java file in editor

  1. Mouse click
    1. Change focus to another window different from editor window.
    2. Click to editor window at any position.
    3. Try to click to different places in editor.
    • EXPECTED RESULT: Focus is changed to editor and cursor should be positioned at the clicked place or at end of line you have clicked.
  2. Mouse click after EOF
    1. Click on the first row in a file, caret should move to this place.
    2. Click behind the end of file to an empty area of editor.
    • EXPECTED RESULT: Caret must move to last line in editor. Caret is placed at EOL or at the column you have clicked (if it exists).
  3. Mouse double click
    1. Move mouse over any word in editor window.
    2. Double click quickly.
    3. Double click in front of the first character of the word.
    4. Double click behind last char of the word.
    • EXPECTED RESULT: Words must be selected (highlighted) and cursor positioned at end of selected words. If you double click between words and separator, the the first positioned (word or separator) will be selected.
  4. Mouse triple click
    1. Quickly triple click on any line in editor.
    • EXPECTED RESULT: Whole line you have clicked on should be selected.
  5. Mouse wheel
    1. Try to use the mouse wheel in editor.
    • EXPECTED RESULT: Document in editor should scroll up or down.
  6. Pop-up menu
    1. Open class in editor
    2. Right-click the editor and check the pop-up menu
    3. Left-click somewhere else in the editor to hide the pop-up menu
    4. Invoke pop-up menu using right-click again
    5. Right-click some other place in editor, pop-up menu should appear in that place
    6. Invoke the pop-up menu for the last time
    7. Press Esc key to hide the pop-up menu
    • EXPECTED RESULT: Pop-up menu is shown and hidden as expected.

Test suite: Selecting text

Purpose: This suite describes various ways of selecting text

  1. Select by mouse
    1. Open some file
    2. Put mouse caret somewhere and select part of line
    3. Try expand selection over several lines
    • EXPECTED RESULT: Selection text is highlighted, the selection area expands as expected
  2. Select by keyboard
    1. Open some file
    2. Put cursor in the middle of the file
    3. Press Shift + arrow keys
    4. Try Shift-Home/Shift-End, Shift-PgUp/Shift/End
    5. Try Ctrl-A
    • EXPECTED RESULT: Selected text is highlighted, selection is expanded as expected
  3. Double click
    1. Open some file
    2. Try double click on some word (press-release-press and hold)
    • EXPECTED RESULT: The whole word is selected
  4. Triple click
    1. Open some file
    2. Try triple click on non empty line (press-release-press-release-press and hold)
    • EXPECTED RESULT: Whole line is selected
  5. Rectangular selection
    1. Open some file
    2. Toggle Rectangular Selection (Alt-Shift-R or by button in editor toolbar)
    3. Select text with keyboard (shift+arrow keys) or by mouse
    4. Try expanding existing selection (shift-arrow keys, or Home/End/PgUp/PgDown)
    • EXPECTED RESULT: Rectangular block of text is selected, selection expands as expected

Test suite: Creating a New File

Purpose: Tests if it is possible to create a new file in a project and if editor's tabs are correctly focused.

  1. Create file
    1. Call File | Create New File
    2. Select Java, Java Class
    3. Press Next"""
    4. Type new class name and package
    5. Confirm by Finish button
    • EXPECTED RESULT: File is created and opened in editor. File has correct name and location. Content of the file is correctly formatted
  2. Create new file cancel
    1. Repeat previous test case but do not press 'Finish but press Cancel
    • EXPECTED RESULT: No file is created
  3. Invalid name or package
    1. Call File | Create New File
    2. Select Java Class and press Next
    3. Enter invalid class name (name is not identifier or already exists)
    4. Entry invalid package name
    • EXPECTED RESULT: Error message is displayed at the bottom of the dialog, Finish button is disabled
  4. Create file from context menu
    1. Right click on package node, Source Package or project node in project view
    2. Select New
    3. Select Other...
    • EXPECTED RESULT: The new submenu contains list of common/lates used file types, Other ... opens New File Dialog as in previous test cases

Test suite: Opening Files in Editor

Purpose: This suite checks if is possible open files in Editor. There are more possibilities how to open file - they are described below.

  1. Open external file
    1. Open external file (file that is not a part of any NB project) from main menu action File|Open File...
    • EXPECTED RESULT:
      - File must be opened in editor.
      - There is a lot of limitations, because the file is not part of any project. (no classpath is set)
      - These features must work: Syntax coloring, Code Completion for JDK classes, Code Folding
      - These features won't work: Code Completion for non JDK classes, Compile/run the class
  2. Open file from project that is not opened
    1. Open file which is part of project which is not opened with File|Open File... menu.
    • EXPECTED RESULT:
      - File must be opened in editor and all java-related stuff must work: Code Completion, Code Folding, compilation, running, etc.
      - This action does not open the project where the class belongs to.
  3. Open a file in Projects view and close it
    1. Open attached project
    2. Expand plaineditor package under Source Packages node in Project view and double click the OpenFile.java source file
    3. Don't modify this file in editor
    4. Invoke popup menu above editor's tab and choose Close All Documents item
    • EXPECTED RESULT: The selected file should be opened in editor and then closed without any dialogs.
  4. Open a file in Files view and close it
    1. Open attached project if it is not opened yet
    2. Expand nodes in Files view and double click on the OpenFile.java source file
    3. Don't modify this file in editor
    4. Invoke popup menu above editor's tab and choose Close All Documents item
    • EXPECTED RESULT: The selected file should be opened in editor and then closed without any dialogs.
  5. Open a file from main menu and close it
    1. Select File|Open File from the main menu and find OpenFile.java file used in previous case
    2. Open it
    3. Don't modify the opened file
    4. Invoke popup menu above editor's tab and choose Close All Documents item
    • EXPECTED RESULT: The selected file should be opened in editor and then closed without any dialogs.
  6. Opening a file that is already opened in editor
    1. Expand nodes in Projects view and double click OpenFile.java source file
    2. Double click OpenFile.java source file in Projects view
    3. Double click OpenFile.java source file in Projects view
    4. Invoke popup menu above editor's tab and choose Close All Documents item
    • EXPECTED RESULT: - The document that was just opened (double-clicked) must be opened and focused in editor
      - All opened documents must be closed after you perform the last step

Test suite: Closing Modified Files

Purpose: This suite checks if a dialog shows up when user attempts to close a modified file

  1. Close a modified file (Save)
    1. Open OpenFile.java and modify it
    2. Modify flag (bold font) must by used in editor tab
    3. Close file with the X on editor's tab
    4. Confirm your changes by clicking Save
    • EXPECTED RESULT:
      - Modify flag must show up after you modify a file.
      - A dialog asking for confirmation must show up after the fourth step.
      - The file must be saved (check it on hard disk) and editor tab must be closed.
  2. Close a modified file (Discard)
    1. Open OpenFile.java and modify it
    2. Close the sample file using Ctrl+W shortcut
    3. Choose Discard in the dialog to discard your changes
    • EXPECTED RESULT:
      - Editor tab should be closed.
      - All changes are lost (check the file on hard disk)
  3. Close a modified file (Cancel)
    1. Open OpenFile.java and modify it
    2. Close the sample file using main menu action Window|Close Window
    3. Choose Cancel
    • EXPECTED RESULT:
      - Nothing happens - a file remains opened and it is not saved
      - A bold font must remain in editor tab

Test suite: Read-Only Files

  1. Open read-only file
    1. Open a read-only file in editor
    2. Try to type some characters inside
    • EXPECTED RESULT:
      - It is not possible to make any changes in read-only file
      - Read-only status is indicated by italics font in the editor's tab
  2. Make file read only
    1. Open any read/write file in editor
    2. Make some changes inside
    3. Make file read only (outside IDE)
    4. Save file
    • EXPECTED RESULT: Saving should not be possible, a warning should be displayed, telling the user that the file has become read only.

Test suite: Tab Focus

  1. Switching editor tabs
    1. Open two Java source files in editor and focus one of them (move mouse cursor to editor pane and click)
    2. Repeatedly switch to next file and return to previous one by clicking on editor tabs
    3. Use next tab action (Ctrl+PgUp/PgDown) to switch to next file
    4. Use Ctrl+Tab to switch to next file
    • EXPECTED RESULT: Tabs should be switched intuitively and focus should remain in editor window.

Test suite: Performance After Startup

Purpose: Test speed and issues caused by IDE initialization.
Setup: Start these tests immediately after main window is opened

  1. Open File After Startup
    1. Start the IDE
    2. Open file (just a file, not a project) OpenFile.java from the sample project in IDE (use "File|Open File" from the main menu)
    3. Close the file
    • EXPECTED RESULT: Editor should be opened within a reasonable time. It should be less than 3 sec. on usual workstation.
  2. Open Project
    1. Start IDE with a fresh userdir
    2. Open sample project
    3. Open file OpenFile.java
    4. Wait until file is opened, wait until scanning is finished (you can see the progress in right-bottom corner of IDE)
    • EXPECTED RESULT:
      - The selected project is opened in reasonable time.
      - Scanning is started immediately after opening the project and should be performed in reasonable time.(runs on background)
      . The file can be edited when opened, syntax coloring for all elements is shown in reasonable time (after scan is finished).

Test suite: Performance when working with long files

Purpose: Tests speed of editing long files in editor

  1. Open Long Java File
    1. Open big java file (performanceBig.java) in editor (e.g. from main menu : File|Open File)
    2. Wait for the file to be opened
    3. Close the file
    4. Open it again and keep it opened
    • EXPECTED RESULT: Time of opening/closing file should be acceptable
  2. Working With Long Java File - No comments
    1. Use the same file from previous case, open it if it is not opened
    2. Try to scroll the file with scrollbars sliders
    3. Add Javadoc comment before the method "newMethod" - type e.g. /** My first javadoc comment */
    4. Test the speed of Enter key inside JavaDoc - press Enter when caret is just after "/**" that you typed in the previous step
    • EXPECTED RESULT: All actions should be done in acceptable time.
  3. Working With Long Java File - No Errors
    1. Switch to the big java file (should be opened in editor from previous case)
    2. Type some new java elements to class, e.g. type Integer myInt = new Integer( and wait for completion
    3. Go through the code completion list
    4. Type 10); and press enter
    5. Go to the end of document (Ctrl+End)
    6. Go to the beginning of document (Ctrl+Home)
    7. Scroll the editor window - hold Ctrl+Up/Down longer then 4 seconds
    • EXPECTED RESULT: All actions should be completed in a very short time
  4. Working With Long Java File - Errors
    1. Switch to the java file (should be opened in editor from previous case)
    2. Do some changes that corrupts the file - corrupt some fields and methods, for example
    3. Go to the end of document (Ctrl+End)
    4. Go to the beginning of document (Ctrl+Home)
    5. Scroll to the editor window - press Ctrl+Up/Down longer then 4 seconds
    6. Type new field to body of a class - type "Integer myInt2 = new Integer(10);"
    • EXPECTED RESULT: All actions should be completed in a short time, errors should show up in editor almost instantly.

Test suite: Internationalization

Purpose: Checks editor's support for national characters
Setup: You must have national support in OS set up (fonts, keyboard, etc.) and some file opened in editor. You can find information about your locale in Help|About

  1. National keyboards
    1. Create a new Java file (File|New File...)
    2. Switch to a keyboard layout that is different from English (e.g. to Czech or German)
    3. Type some non-English characters in the editor
    4. Save and close the file
    5. Open the file again
    • EXPECTED RESULT: All characters in chosen language should be displayed properly.
  2. I18N undo action
    1. Select part of the text with national characters and invoke Cut action (Ctrl+X).
    2. Try to invoke the Undo action (Ctrl+Z).
    • EXPECTED RESULT: All changes should be correctly undone.

Test suite: Line Endings

  1. Line endings - new files
    1. Create new Java file
    • EXPECTED RESULT: Check line endings of the new file in any binary editor (for example "mc" in Linux, press F3 to view the file and then F4 to switch to HEX mode). It should be '\n'
  2. Line endings - existing Java files
    1. Open a file with Unix EOL's (NewCanvasActionUnix.java under test.eols package)
    2. Type some new lines
    3. Open a file with windows EOL's (NewCanvasActionWin.java under test.eols package)
    4. Type some new lines
    5. Open a file with Mac EOL's (NewCanvasActionMac.java under test.eols package)
    6. Type some new lines
    7. Save files
    • EXPECTED RESULT: Check line endings in any binary editor for all files. The type of line endings must be preserved

Test suite: Using Clipboard

Purpose: To test Copy/Cut/Paste actions and interoperability with external/native editors.
Setup: You will need two java files opened in editor.

  1. Copy/Cut data inside a single Java file
    1. Switch to a java file in editor.
    2. Select a portion of text and copy it to the clipboard (Edit|Copy or Ctrl+C)
    3. Move blinking caret to another place of editor and paste data from clipboard to the source file (Edit|Paste or Ctrl+V)
    4. Select another portion of text and cut it to the clipboard (Edit|Cut or Ctrl+X)
    5. Move blinking caret to another place of editor and paste data from clipboard to the source file (Edit|Paste or Ctrl+V)
    • EXPECTED RESULT: Copied text is duplicated in editor, cut text is removed, texts are placed in caret position. Caret should be behind pasted data.
  2. Copy/Cut data between two edited files
    1. Switch to the first file.
    2. Select any portion of text and copy (or cut) it to the clipboard
    3. Switch to the second file.
    4. Paste the data from clipboard to the second file
    • EXPECTED RESULT: Selected text is copied (cut) from the first file to the second file.
  3. Copy/Cut data To cloned view
    1. Switch to a java file.
    2. Select any portion of text and copy (or cut) it to the clipboard
    3. Clone view (display popup menu over editor's tab and invoke "Clone Document").
    4. There should be auto focus on the cloned view, if no then get focus to the cloned view (click to cloned view).
    5. Paste data from clipboard to source file in cloned view
    • EXPECTED RESULT: Text is correctly pasted in caret's position and both editor windows (cloned and original) contain the same data.
  4. Copy/Cut data from OS to Netbeans
    1. Open any file in native editor which uses system clipboard
    2. Select some text and copy (or cut) it to the system clipboard (depends on native editor)
    3. Focus some Netbeans Java editor tab
    4. Paste text from clipboard to the edited file
    • EXPECTED RESULT: Selected text is copied from native editor and correctly pasted to Netbeans editor.
  5. Copy/Cut data from Netbeans to OS
    1. Switch to a file in IDE's editor
    2. Select some text in and copy (or cut) it to clipboard
    3. Open any file in native editor which use system clipboard
    4. Paste text from clipboard to a text file in native editor (depends on native editor)
    • EXPECTED RESULT: Selected text is copied from Netbeans to native editor
  6. Rectangular selection
    1. Turn on rectangular selection
    2. Select block of code
    3. Press Copy (or Cut)
    4. Select another rectangular block of code as target
    5. Press Paste
    • EXPECTED RESULT: Block of code of copied / moved to new position

Test suite: Drag & Drop

Purpose: Tests the drag & drop functionality inside NetBeans editor.
Setup: Opened any file in editor and focus should be in editor window.

  1. Basic test
    1. Select a block of code by mouse
    2. Drag the code and drop it to a different position in source code
    • EXPECTED RESULT: The code should be moved to the new position.
  2. Undo test
    1. Drag & Drop a piece of code
    2. Press Ctrl+Z
    • EXPECTED RESULT: The code should be moved and undo should return the code into it's original position.
  3. Interaction with guarded blocks
    1. Create a new form
    2. Try to invoke drag&drop action on guarded blocks
    • EXPECTED RESULT: Only the code outside guarded blocks should be moved. The code inside guarded blocks is copied.

Test suite: Editor's Toolbar and Line numbers

  1. Show and hide line numbers (using gutter)
    1. Open a file in editor.
    2. Check if gutter is in its position (gutter = gray left edge of editor window).
    3. Invoke popup menu above gutter
    4. Try to check/uncheck Show Line Numbers
    • EXPECTED RESULT:
      - Gutter must be displayed on the left side of the Editor Window
      - Line numbers should be shown or hidden according to state of checkbox in gutter's context menu
  2. Show and hide editor's toolbar (using gutter)
    1. Open a file in editor
    2. Check if gutter is in its position (gutter = gray left edge of editor window).
    3. Invoke popup menu above gutter
    4. Try to check/uncheck Show Toolbar
    • EXPECTED RESULT:
      - Gutter must be displayed on the left side of the Editor Window
      - Editor's toolbar should be shown or hidden according to state of checkbox in gutter's context menu
  3. Show and hide line numbers (using main menu)
    1. Open Java file in editor
    2. Try to show/hide line numbers using main menu action View|Show Line Numbers
    • EXPECTED RESULT: Line numbers should be displayed and hidden according to state of checkbox state.
  4. Show and hide editor's toolbar (using main menu)
    1. Open Java file in editor
    2. Try to show/hide editor's toolbar using main menu action View|Show Editor Toolbar
    • EXPECTED RESULT: Toolbar should be displayed and hidden according to state of checkbox state.

Test suite: Find&Replace Test

Purpose: This suite tests the search/replace bar

  1. Open and close search bar
    1. Open some file
    2. Press Ctrl-F
    3. Type some text info Search text field
    4. Open another file or switch editor
    5. Close search button by x button
    6. Open search bar again and press Esc when focus is in search text field
    • EXPECTED RESULT: Search bar is opened and focus is transferred to Search text field.
      Search bar stays opened when switching editors.
      Esc or x button closes search bar
  2. Simple search
    1. Open search.txt
    2. Open search bar and type Search
    3. Press enter
    4. Press Next button in search bar several times
    • EXPECTED RESULT: Search bar is opened. Search result are highlighted while typing. When enter is pressed focus is transferred to editor and cursor is moved to the first occurrence. In status bar there is message that search was successfull. Next"" button jumps across next occurrences of given text.
  3. Search backwards
    1. Open search.txt
    2. Put cursor at the end of text
    3. Press Ctrl-F' and type search
    4. Press Previous several times
    • EXPECTED RESULT: Cursor is move to last occurrence of searched text before current position
  4. Match Case
    1. Open search.txt
    2. Press Ctrl-F
    3. Type Search and check Match Case
    4. Press enter
    • EXPECTED RESULT: Only occurrences with correct case are found
  5. Whole words
    1. Open search.txt
    2. Press Ctrl-F and type search
    3. Press enter
    • EXPECTED RESULT: Only whole words are found
  6. Regular expression
    1. Open search.txt
    2. Press Ctrl-F and type .*[1-9]."
    3. Check Regular Expression check box and press Enter
    • EXPECTED RESULT: One occurrence is found. Only 4 characters are selected
  7. Highlight results
    1. Open search.txt and press Ctrl-F
    2. Type search into the text field
    3. Toggle Highlight Results
    • EXPECTED RESULT: When Highlight is on, all occurrences of searched text is marked by orange background, this mark stays even when search bar is closed
  8. Wrap around
    1. Open search.txt and press Ctrl-F
    2. type search into text field
    3. toggle Wrap Around and press Next several times
    • EXPECTED RESULT: When wrap is on the search continues from the beginning of the file, once the EOF is reached. Otherwise the search ends an the end of the file with message search is not found in the status bar
  9. Searching when search bar is closed
    1. Open search.txt and press Ctrl-F
    2. type search into the text field and press enter
    3. Close search bar
    4. Try Find Next Occurrence, Find Previous Occurrence and Toggle Highlight Results from the editor tool bar.
    • EXPECTED RESULT: The buttons works as expected
  10. Previous searches
    1. Open search bar
    2. Expand Search: combo box
    • EXPECTED RESULT: Combo box list contains all strings from previous searches
  11. Open replace dialog
    1. Open some file
    2. Press Ctrl-H
    3. Close replace bar by x button and by esc
    • EXPECTED RESULT: Replace bar is correctly opened, x button or esc closes the panel
  12. Simple replace
    1. Open search.txt and press Ctrl-H
    2. Type search to search text field, type replaced to replace with text field
    3. Press Replace
    4. Undo all changes
    • EXPECTED RESULT: Next occurrence of search behind cursor position is replace with replaced, Changes can be undone
  13. Replace All
    1. Open search.txt and press Ctrl-H
    2. Type search to search text field and replaced to replace with
    3. Press Replace all
    4. Undo all changes
    • EXPECTED RESULT: All occurrences of search behind current cursor position are replaced with replaced (if wrap around is enabled the all occurrences is whole file are replaced)
  14. Replace backwards
    1. Open search.txt and press Ctrl-H
    2. Type search into search text field and press Next several times
    3. type replaced into replace with text field
    4. check Replace backwards' and press Replace
    5. Undo all changes
    • EXPECTED RESULT: Last occurrence of search before current cursor position is replaced
  15. Preserve case
    1. Open search.txt and press Ctrl-H
    2. Type search into search text field, uncheck Match case
    3. Type replaced into replace with text field
    4. Check '"Preserve Case and press Replace All
    5. Undo changes
    • EXPECTED RESULT: All occurrences are replaced. Case is preserved, e.g. search is replaced with replaced and Search is replaced with Replaced
  16. Search Selection
    1. Open search.txt
    2. Select part of some word
    3. Press Ctrl-F3 or use Find Selection from editor toolbar
    • EXPECTED RESULT: All occurrences of selected text are found, cursor is moved to the first of them

Test suite: Bookmarks

Purpose:

Setup: Opened any file in editor

  1. Adding bookmarks
    1. Put caret at any line in document
    2. Press Ctrl-Shift-M
    3. use contex menu in gutter -> Bookmarks | Toggle Bookmark
    4. use button in editor toolbar (tooltip: Toggle Bookmark)
    • EXPECTED RESULT: Bookmark is added to current line or is removed if there is one already
  2. Navigating among bookmarks
    1. Place several bookmarks in a file
    2. Press Ctrl-Shift-Comma/Ctrl-Shift-Period
    3. Use gutter context menu - Bookmarks | Next Bookmark / Bookmarks | Previous Bookmark
    4. Use buttons in editor toolbar
    • EXPECTED RESULT: Caret cycle through bookmarked lines
  3. Bookmark persistence
    1. Place several bookmarks in a file
    2. Switch files
    3. Close/Reopen file
    4. Restart IDE
    • EXPECTED RESULT: Bookmark should stay intact
  4. Moving bookmark
    1. Put bookmark in the document
    2. Go to previous line and press enter or delete it
    • EXPECTED RESULT: Bookmark moved to mark the same line of code (e.g. is moved to next line if a new line is added before if and vice versa)

Test suite: Go To Line

  1. Go to Line
    1. Open some file
    2. Call Go to line from main menu Navigation | Go to line "" or use shortcut Ctrl-G
    3. Enter some value and press enter
    • EXPECTED RESULT: Caret is moved to proper line of code
  2. Go to line behind EOF
    1. Call Go to Line
    2. Enter number bigger then number of line in current file and confirm
    • EXPECTED RESULT: Caret is moved at the last line of the file
  3. Go to line - negative case
    1. Open Go To Line
    2. Try enter invalid values - character, negative or float number
    • EXPECTED RESULT: Invalid value cannot by entered
  4. Go to line - last values
    1. Call Go To Line
    2. Check the combo box values
    • EXPECTED RESULT: Combo box contains recently used values
  5. Go to line - Cancel
    1. Call Go To Line
    2. Press Cancel
    • EXPECTED RESULT: Caret is not moved, Go To Line dialog is closed

Test suite: Jump List

  1. Basic Jump List functionality
    1. Open several java files and perform several searches.
    2. Try to jump through the jump list by pressing ALT+Left for previous entry and ALT+Right for next entry
    3. Try to jump through the jump list by selecting specific file from a popup window available in the right part of Go forward/Go backward buttons (editor toolbar)
    • EXPECTED RESULT: Editor should navigate through all positions in successful searches. Watch out for performance and for side effects.
  2. Jump List - comboboxes
    1. Open some file
    2. Perform several Go To Source/Definition, among multiple files
    3. Open Jump List (by clicking on small black down arrow next to Go Back/ Forward button
    4. From the list select some item and click on it
    • EXPECTED RESULT: Black button open list of previous/next locations in the jump list. Clicking on item will move cursor to related position
  3. Last edit
    1. Open some file and modify it
    2. Save it and close
    3. Press Ctrl-Q (or use button in editor tool bar)
    • EXPECTED RESULT: File is opened again and cursor is moved to position where the file was edited

Test suite: Print to HTML

  1. Menu Print to HTML
    1. Check main menu File|Print to HTML.
    • EXPECTED RESULT: Name of menu is "Print to HTML", mnemonic is on 'H'. Enabled only when a file is selected in Explorer window.
  2. Default values
    1. Open a java file.
    2. Invoke "Print to HTML" dialog.
    • EXPECTED RESULT: Default file location is in your home directory. ( e.g. /home/pf120623/Test.java )
      Colors used are the same as those in Editor (without semantic coloring).
      Option "Print only selected text" is enabled only if piece of code is selected in the editor. In this case, it is selected by default.
      Option "Show line numbers" is enabled is line numbers are visible in editor.
      Option "Open generated HTML in browser" is enabled for all time and not selected by default.
  3. Select Location
    1. Open Print to HTML dialog.
    2. Type a path of file to text field. E.g. /tmp/test.html
    3. Click to Browse ... button -> File chooser dialog
    4. Click Cancel in file chooser dialog
    5. Click to Browse ... button again -> File chooser dialog
    6. Change path. E.g. /var/tmp/test2.html and confirm file chooser dialog by Open.
    7. Confirm Print to HTML dialog by Ok button.
    • EXPECTED RESULT: The path shouldn't be changed after step 4. (must be /tmp/test.html)
      The path should be changed in step 6. There should be created new file /var/tmp/test2.html
  4. Select Only selected text
    1. Select some rows of code in the Editor.
    2. Open Print to HTML dialog and confirm it.
    • EXPECTED RESULT: The checkbox "Print only selected text" should be enabled and selected. There should be a html file created, containing only selected text. Check this in HTML browser.
  5. Select Open generated HTML in browser
    1. Open Print to HTML dialog.
    2. Select option "Open generated HTML in browser"
    3. Confirm the dialog with Ok button
    • EXPECTED RESULT: File should be generated and opened in default HTML browser.

Test suite: Word Matching

  1. Previous Word
    1. Open some file
    2. Put cursor in the middle of the text
    3. Press Ctrl-K several times
    • EXPECTED RESULT: Previous word from the code is inserted at cursor position.
  2. Next Word
    1. Repeat previous test case but press Ctrl-Shit-K
    • EXPECTED RESULT: Next word from the code is inserted as cursor position
  3. Filtered world matching
    1. Open some file
    2. Put caret at the middle of the code
    3. Type some character, e.g. 'p'
    4. Press Ctrl-K
    • EXPECTED RESULT: Previous word beginning with 'p' is inserted at cursor position

Test suite: Select Document Node in Project,Files,Favorites

  1. Menu "Navigate"
    1. Verify functionality for every Navigate|Select in ... main menu item:
    2. Have a document focused in the IDE
    3. Use Select in Projects command or use shortcut Ctrl+Shift+1
      → the file is selected in Projects
    4. Use Select in Files command or use shortcut Ctrl+Shift+2
      → the file is selected in Files
    5. Use Select in Favorites command or use shortcut Ctrl+Shift+3
      → the file is selected in Favorites
    • EXPECTED RESULT: Node corresponding to opened editor is selected in Project/Files/Favorites view
  2. Same name test - Projects view
    1. Close all projects and create a new project
    2. Create files Main.java and Main.html in one package
    3. Open Main.java and call Select in Project
    4. Open Main.html and call Select in Project
    5. Try to repeat previous steps
    • EXPECTED RESULT: The right node is always selected in Projects view
  3. Same name test - Files view
    1. Close all projects and create a new project
    2. Create files Main.java and Main.html in one package
    3. Open Main.java and call Select in Files
    4. Open Main.html and call Select in Files
    5. Try to repeat previous steps
    • EXPECTED RESULT: The right node is always selected in Files view

Test suite: Change case, insert current date

  1. Selection to upper-case
    1. Open a java file in editor.
    2. Select some text with both lower and upper case
    3. Press Ctrl+U U (Ctrl+U followed by U)
    • EXPECTED RESULT:
      - Selection should be converted to upper-case.
  2. Selection to lower-case
    1. Open a java file in editor.
    2. Select some text with both lower and upper case
    3. Press Ctrl+U L (Ctrl+U followed by L)
    • EXPECTED RESULT:
      - Selection should be converted to lower-case.
  3. Switch case in selection
    1. Open a java file in editor.
    2. Select some text with both lower and upper case
    3. Press Ctrl+U S (Ctrl+U followed by S)
    • EXPECTED RESULT:
      - Selection should be converted so that letters that were originally in capitals are now in lower case and vice versa.

Test suite: Show white spaces

  1. Enable show not printable character
    1. Open some file
    2. Select View -> Show Notprintable character
    • EXPECTED RESULT: Non-printable (space, new lines and tabs) characters are showed in all editors
  2. Typing not printable characters
    1. Open some editor
    2. Type space and tab
    3. Enter new-lines
    • EXPECTED RESULT: Newly typed not printable characters are indicated by appropriate symbols (the formatting settings may by changed to input tab character)

Test suite: Zoom

Purpose: This test suite is related to zoom in text editor.

  1. Zoom in
    1. Open Tools->Options->Keymap and set shortcut for Zoom Text In action
    2. Open editor and call Zoom Text In action
    • EXPECTED RESULT: The font in editor is enlarged. Syntax coloring must stay untouched
  2. Zoom out
    1. Open Tools->Options->Keymap and set shortcut for Zoom Text Out
    2. Open some file and call Zoom Text Out action
    • EXPECTED RESULT: Font size in actual editor is reduced.
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