TS 71 Editor

(Difference between revisions)
(Created page with '==Plain Editor Test Specification== '''Author:'''[mailto:Jiri.Prox@Oracle.COM Jiri Prox]<br/> '''Version:''' 7.1 <br/> '''Last update:'''2011/09/19<br/> '''Introduction:'''This s…')
 
Line 2: Line 2:
'''Author:'''[mailto:Jiri.Prox@Oracle.COM Jiri Prox]<br/>
'''Author:'''[mailto:Jiri.Prox@Oracle.COM Jiri Prox]<br/>
'''Version:''' 7.1 <br/>
'''Version:''' 7.1 <br/>
-
'''Last update:'''2011/09/19<br/>
+
'''Last update:'''2011/10/06<br/>
-
'''Introduction:'''This specification cover features of plain editor. This functionality common to all files and should work in every kind of editor. It cover basis editing, navigation, text selecting and other commont utilities. <br/>
+
'''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. <br/>
__TOC__
__TOC__
====Test suite: Keyboard and Shortcuts====
====Test suite: Keyboard and Shortcuts====
-
Purpose: Tests key shortcuts, basic manipulations with caret and modifying editor's content <br><br/>
+
<!-- minutes: 6 -->
 +
Purpose: Tests key shortcuts, basic manipulations with caret and modifying editor's content<br/>
# {{testcase|Typing characters in editor}}
# {{testcase|Typing characters in editor}}
## Open some Java file and focus the editor
## Open some Java file and focus the editor
## Try to type some text in the editor
## Try to type some text in the editor
-
## Press '''Insert''' to switch from insertion to overwrite mode (on mac first map the Toggle Typing Mode keymap in NetBeans Preferences)
+
## Press '''insert''' to switch from insertion to overwrite mode (on mac first map the Toggle Typing Mode keymap in NetBeans Preferences)
## Type some characters when overwrite mode is on
## Type some characters when overwrite mode is on
## Open some Java file and focus the editor
## Open some Java file and focus the editor
Line 29: Line 30:
## Try to use '''Undo/Redo''' shortcuts '''Ctrl-Z'''/'''Ctrl-Y''', it should not be possible to do it because no changes were done previously
## Try to use '''Undo/Redo''' shortcuts '''Ctrl-Z'''/'''Ctrl-Y''', it should not be possible to do it because no changes were done previously
## Check if menu items for Undo/Redo ('''Edit|Undo''' and '''Edit|Redo''') are disabled
## Check if menu items for Undo/Redo ('''Edit|Undo''' and '''Edit|Redo''') are disabled
-
## Perform any changes__ in the file
+
## Perform any changes in the file
## Use the '''Undo''' action once ('''Ctrl+Z''' or a toolbar icon)
## Use the '''Undo''' action once ('''Ctrl+Z''' or a toolbar icon)
## Use the '''Redo''' action once ('''Ctrl+Y''' or a toolbar icon)
## Use the '''Redo''' action once ('''Ctrl+Y''' or a toolbar icon)
-
## Type__ another characters
+
## Type another characters
## 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
## 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
-
#* {{result|EXPECTED RESULT:  Flag suggesting file is modified (small star next to the name of file in editor's tab) disappeared after the last step and undo properly cleared all typed changes (characters). }}
+
#* {{result|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  }}
# {{testcase|Other keybindings}}
# {{testcase|Other keybindings}}
## Try some of the key shortcuts defined in '''Tools|Options|Keymap'''
## Try some of the key shortcuts defined in '''Tools|Options|Keymap'''
## Set a new shortcut for some action and then invoke it in editor
## Set a new shortcut for some action and then invoke it in editor
## Try to change existing shortcut to something different
## Try to change existing shortcut to something different
-
#* {{result|EXPECTED RESULT:  The proper action is always called. In step 3, the old shortcut does not work any more. }}
+
#* {{result|EXPECTED RESULT:  The proper action is always called. In step 3, the old shortcut does not work any more.       }}
# {{testcase|Remove line}}
# {{testcase|Remove line}}
## Open some file in the editor
## Open some file in the editor
Line 45: Line 46:
## Press '''Shift+Delete''' (or '''Ctrl+E''')
## Press '''Shift+Delete''' (or '''Ctrl+E''')
## Undo the last action
## Undo the last action
-
#* {{result|EXPECTED RESULT:  Whole line is removed when you press Shift+Delete. Line deletion can be undone. }}
+
#* {{result|EXPECTED RESULT:  Whole line is removed when you press Shift+Delete. Line deletion can be undone.       }}
-
# {{testcase|Remove next/prevoius word}}
+
-
## Open some file in the editor
+
-
## Place caret in the middle of some non-empty line
+
-
## Press '''Ctrl+Delete''' to delete next word
+
-
## Press '''Ctrl+Backspace''' to delete previous word
+
-
## OPTIONAL: Try to use these shortcuts in front of/behind the guarded blocks &rarr; it mustn't be possible to delete guarded blocks using these shortcuts
+
-
#* {{result|EXPECTED RESULT:  Ctrl+Delete deletes the word just behind caret, Ctrl+Backspace deletes word just in front of caret. }}
+
====Test suite: Mouse Test====
====Test suite: Mouse Test====
-
Purpose: Tests basic mouse functionality. <br><br/>
+
<!-- minutes: 8 -->
-
Setup: Opened some Java file in editor <br> <br/>
+
Purpose: Tests basic mouse functionality.<br/>
 +
Setup: Opened some Java file in editor<br/>
# {{testcase|Mouse click}}
# {{testcase|Mouse click}}
## Change focus to another window different from editor window.
## Change focus to another window different from editor window.
## Click to editor window at any position.
## Click to editor window at any position.
## Try to click to different places in editor.
## Try to click to different places in editor.
-
#* {{result|EXPECTED RESULT:  Focus is changed to editor and cursor should be positioned at the clicked place or at end of line you have clicked. }}
+
#* {{result|EXPECTED RESULT:  Focus is changed to editor and cursor should be positioned at the clicked place or at end of line you have clicked.       }}
# {{testcase|Mouse click after EOF}}
# {{testcase|Mouse click after EOF}}
## Click on the first row in a file, caret should move to this place.
## Click on the first row in a file, caret should move to this place.
## Click behind the end of file to an empty area of editor.
## Click behind the end of file to an empty area of editor.
-
#* {{result|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). }}
+
#* {{result|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). }}
# {{testcase|Mouse double click}}
# {{testcase|Mouse double click}}
## Move mouse over any word in editor window.
## Move mouse over any word in editor window.
Line 71: Line 66:
## Double click in front of the first character of the word.
## Double click in front of the first character of the word.
## Double click behind last char of the word.
## Double click behind last char of the word.
-
#* {{result|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. }}
+
#* {{result|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.       }}
# {{testcase|Mouse triple click}}
# {{testcase|Mouse triple click}}
## Quickly triple click on any line in editor.
## Quickly triple click on any line in editor.
-
#* {{result|EXPECTED RESULT:  Whole line you have clicked on should be selected. }}
+
#* {{result|EXPECTED RESULT:  Whole line you have clicked on should be selected.       }}
# {{testcase|Mouse wheel}}
# {{testcase|Mouse wheel}}
## Try to use the mouse wheel in editor.
## Try to use the mouse wheel in editor.
-
#* {{result|EXPECTED RESULT:  Document in editor should scroll up or down. }}
+
#* {{result|EXPECTED RESULT:  Document in editor should scroll up or down.       }}
# {{testcase|Pop-up menu}}
# {{testcase|Pop-up menu}}
## Open class in editor
## Open class in editor
Line 86: Line 81:
## Invoke the pop-up menu for the last time
## Invoke the pop-up menu for the last time
## Press '''Esc''' key to hide the pop-up menu
## Press '''Esc''' key to hide the pop-up menu
-
#* {{result|EXPECTED RESULT:  Pop-up menu is shown and hidden as expected. }}
+
#* {{result|EXPECTED RESULT:  Pop-up menu is shown and hidden as expected.       }}
-
# {{testcase|Support for URLs in editor}}
+
-
## Open class in editor.
+
-
## Enter some code that contains URL, e.g.:
+
-
#* {{result|EXPECTED RESULT:  Entire URL specified in previous step should be underlined. Clicking the URL while holding CTRL (Cmd on Mac) should open this page in preferred browser. }}
+
====Test suite: Selecting text====
====Test suite: Selecting text====
-
Purpose: This suite describes variou ways of selecting text<br/>
+
<!-- minutes: 4 -->
 +
Purpose: This suite describes various ways of selecting text<br/>
# {{testcase|Select by mouse}}
# {{testcase|Select by mouse}}
## Open some file
## Open some file
## Put mouse caret somewhere and select part of line
## Put mouse caret somewhere and select part of line
## Try expand selection over several lines
## Try expand selection over several lines
-
#* {{result|EXPECTED RESULT: Selection text is highlighted, the selection area expands as expected }}
+
#* {{result|EXPECTED RESULT:       Selection text is highlighted, the selection area expands as expected       }}
# {{testcase|Select by keyboard}}
# {{testcase|Select by keyboard}}
## Open some file
## Open some file
-
## Put cursor in the midle of the file
+
## Put cursor in the middle of the file
## Press Shift + arrow keys
## Press Shift + arrow keys
## Try Shift-Home/Shift-End, Shift-PgUp/Shift/End
## Try Shift-Home/Shift-End, Shift-PgUp/Shift/End
## Try Ctrl-A
## Try Ctrl-A
-
#* {{result|EXPECTED RESULT: Selected text is highlighted, selection is expanded as expected }}
+
#* {{result|EXPECTED RESULT:       Selected text is highlighted, selection is expanded as expected       }}
# {{testcase|Double click}}
# {{testcase|Double click}}
## Open some file
## Open some file
## Try double click on some word (press-release-press and hold)
## Try double click on some word (press-release-press and hold)
-
#* {{result|EXPECTED RESULT: The whole word is selected }}
+
#* {{result|EXPECTED RESULT: The whole word is selected       }}
# {{testcase|Triple click}}
# {{testcase|Triple click}}
## Open some file
## Open some file
## Try triple click on non empty line (press-release-press-release-press and hold)
## Try triple click on non empty line (press-release-press-release-press and hold)
-
#* {{result|EXPECTED RESULT: Whole line is selected }}
+
#* {{result|EXPECTED RESULT: Whole line is selected       }}
# {{testcase|Rectangular selection }}
# {{testcase|Rectangular selection }}
## Open some file
## Open some file
Line 119: Line 111:
## Select text with keyboard (shift+arrow keys) or by mouse
## Select text with keyboard (shift+arrow keys) or by mouse
## Try expanding existing selection (shift-arrow keys, or Home/End/PgUp/PgDown)
## Try expanding existing selection (shift-arrow keys, or Home/End/PgUp/PgDown)
-
#* {{result|EXPECTED RESULT: Rectangular block of text is selected, selection expands as expected }}
+
#* {{result|EXPECTED RESULT: Rectangular block of text is selected, selection expands as expected }}
-
# {{testcase|Rectangular copy&paste}}
+
-
## Open some file
+
-
## Select block of text
+
-
## Press Ctrl-C
+
-
## Select block of text as target area
+
-
## Press ctrl-V
+
-
#* {{result|EXPECTED RESULT: Block of text is copied }}
+
====Test suite: Creating a New File====
====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. <br><br/>
+
<!-- minutes: 4 -->
-
Setup: Open a [[File:sampleEditorFiles_TS_68_JavaEditorFiles.zip sample project]].<br><br/>
+
Purpose: Tests if it is possible to create a new file in a project and if editor's tabs are correctly focused. <br/>
-
# {{testcase|New file}}
+
# {{testcase|Create file}}
-
## Invoke '''File|New File...''' from the main menu
+
## Call '''File | Create New File'''
-
## Select '''Java''' category and '''Java Class''' file type
+
## Select '''Java''', '''Java Class'''
-
## Click '''Next''', fill in some class name and click '''Finish'''
+
## Press '''Next"""
-
## Create a few more Java classes (repeat these steps a few more times)
+
## Type new class name and package
-
#* {{result|EXPECTED RESULT:  Whenever a new file is created it is opened in editor and focused. }}
+
## Confirm by '''Finish''' button
 +
#* {{result|EXPECTED RESULT:  File is created and opened in editor. File has correct name and location. Content of the file is correctly formatted  }}
 +
# {{testcase|Create new file cancel}}
 +
## Repeat previous test case but do not press 'Finish''' but press '''Cancel'''
 +
#* {{result|EXPECTED RESULT:  No file is created  }}
 +
# {{testcase|Invalid name or package}}
 +
## Call '''File | Create New File'''
 +
## Select Java Class and press '''Next'''
 +
## Enter invalid class name (name is not identifier or already exists)
 +
## Entry invalid package name
 +
#* {{result|EXPECTED RESULT:  Error message is displayed at the bottom of the dialog, '''Finish''' button is disabled  }}
 +
# {{testcase|Create file from context menu}}
 +
## Right click on package node,  '''Source Package''' or project node in project view
 +
## Select '''New'''
 +
## Select '''Other...'''
 +
#* {{result|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====
====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. <br><br/>
+
<!-- minutes: 6 -->
-
Setup: Close all opened projects. Use files from [[File:sampleEditorFiles_TS_68_JavaEditorFiles.zip sample project]] in following test cases. <br> <br/>
+
Purpose: This suite checks if is possible open files in Editor. There are more possibilities how to open file - they are described below.<br/>
# {{testcase|Open external file}}
# {{testcase|Open external file}}
## Open external file (file that is not a part of any NB project) from main menu action '''File|Open File...'''
## Open external file (file that is not a part of any NB project) from main menu action '''File|Open File...'''
-
#* {{result|EXPECTED RESULT: <br>- File must be opened in editor. <br>- There is a lot of limitations, because the file is not part of any project. (no classpath is set) <br>- These features must work: Syntax coloring, Code Completion for JDK classes, Code Folding<br>- These features won't work: Code Completion for non JDK classes, Compile/run the class <br> }}
+
#* {{result|EXPECTED RESULT:       <br>- File must be opened in editor. <br>- There is a lot of limitations, because the file is not part of any project. (no classpath is set) <br>- These features must work: Syntax coloring, Code Completion for JDK classes, Code Folding<br>- These features won't work: Code Completion for non JDK classes, Compile/run the class <br>       }}
# {{testcase|Open file from project that is not opened}}
# {{testcase|Open file from project that is not opened}}
-
## Open <tt> OpenFileBasic.java </tt> with '''File|Open File...''' menu. This class can be found in sample project archive under <tt> sampleEdirorFiles/src/test/opening </tt> directory
+
## Open file which is part of project which is not opened with '''File|Open File...''' menu.
-
#* {{result|EXPECTED RESULT: <br>- File must be opened in editor and all java-related stuff must work: Code Completion, Code Folding, compilation, running, etc. <br>- This action does not open the project where the class belongs to. }}
+
#* {{result|EXPECTED RESULT:       <br>- File must be opened in editor and all java-related stuff must work: Code Completion, Code Folding, compilation, running, etc. <br>- This action does not open the project where the class belongs to.       }}
# {{testcase|Open a file in Projects view and close it}}
# {{testcase|Open a file in Projects view and close it}}
-
## Open a [[File:sampleEditorFiles_TS_68_JavaEditorFiles.zip sample project]]
+
## Open attached project
-
## Expand <tt> test.opening </tt> package under Source Packages node in Project view and double click the <tt> OpenFile.java </tt> source file
+
## Expand <tt>plaineditor</tt> package under Source Packages node in Project view and double click the <tt> OpenFile.java </tt> source file
## '''Don't modify''' this file in editor
## '''Don't modify''' this file in editor
## Invoke popup menu above editor's tab and choose '''Close All Documents''' item
## Invoke popup menu above editor's tab and choose '''Close All Documents''' item
-
#* {{result|EXPECTED RESULT:  The selected file should be opened in editor and then closed without any dialogs. }}
+
#* {{result|EXPECTED RESULT:  The selected file should be opened in editor and then closed without any dialogs.       }}
# {{testcase|Open a file in Files view and close it}}
# {{testcase|Open a file in Files view and close it}}
-
## Open a [[File:sampleEditorFiles_TS_68_JavaEditorFiles.zip sample project]] if it is not opened yet
+
## Open attached project if it is not opened yet
## Expand nodes in Files view and double click on the <tt> OpenFile.java </tt> source file
## Expand nodes in Files view and double click on the <tt> OpenFile.java </tt> source file
## '''Don't modify''' this file in editor
## '''Don't modify''' this file in editor
## Invoke popup menu above editor's tab and choose '''Close All Documents''' item
## Invoke popup menu above editor's tab and choose '''Close All Documents''' item
-
#* {{result|EXPECTED RESULT:  The selected file should be opened in editor and then closed without any dialogs. }}
+
#* {{result|EXPECTED RESULT:  The selected file should be opened in editor and then closed without any dialogs.       }}
# {{testcase|Open a file from main menu and close it}}
# {{testcase|Open a file from main menu and close it}}
## Select '''File|Open File''' from the main menu and find <tt> OpenFile.java </tt> file used in previous case
## Select '''File|Open File''' from the main menu and find <tt> OpenFile.java </tt> file used in previous case
Line 164: Line 164:
## '''Don't modify''' the opened file
## '''Don't modify''' the opened file
## Invoke popup menu above editor's tab and choose '''Close All Documents''' item
## Invoke popup menu above editor's tab and choose '''Close All Documents''' item
-
#* {{result|EXPECTED RESULT:  The selected file should be opened in editor and then closed without any dialogs. }}
+
#* {{result|EXPECTED RESULT:  The selected file should be opened in editor and then closed without any dialogs.       }}
# {{testcase|Opening a file that is already opened in editor}}
# {{testcase|Opening a file that is already opened in editor}}
## Expand nodes in Projects view and double click <tt> OpenFile.java </tt> source file
## Expand nodes in Projects view and double click <tt> OpenFile.java </tt> source file
-
## Double click <tt> OpenFileBasic.java </tt> source file in Projects view
+
## Double click <tt> OpenFile.java </tt> source file in Projects view
## Double click <tt> OpenFile.java </tt> source file in Projects view
## Double click <tt> OpenFile.java </tt> source file in Projects view
## Invoke popup menu above editor's tab and choose '''Close All Documents''' item
## Invoke popup menu above editor's tab and choose '''Close All Documents''' item
-
#* {{result|EXPECTED RESULT: <br>- The document that was just opened (double-clicked) must be opened and focused in editor<br>- All opened documents must be closed after you perform the last step }}
+
#* {{result|EXPECTED RESULT: - The document that was just opened (double-clicked) must be opened and focused in editor<br>- All opened documents must be closed after you perform the last step       }}
-
# {{testcase|Clone opened document ("Fake Editor Split")}}
+
-
## Open a java class (for example OpenFile.java from the sample project)
+
-
## Right click on editor's tab and choose '''Clone Document'''
+
-
## Move the cloned document to the bottom of the screen
+
-
## Try to open more files (use files under <tt>test.dummy</tt> package, for example)
+
-
## Move opened files from the top window to the bottom one and vice versa (move files between fake splits)
+
-
## Try to close all documents one by one
+
-
#* {{result|EXPECTED RESULT: <br>- Editor should split into two views<br>- It should be possible to drag &amp; drop editor tabs from top editor to the bottom one<br>- When closing the documents, the split should disappear when all documents are in the top or bottom part }}
+
====Test suite: Closing Modified Files====
====Test suite: Closing Modified Files====
-
Purpose: This suite checks if a dialog shows up when user attempts to close a modified file.<br><br/>
+
<!-- minutes: 4 -->
-
Setup: Close all opened projects except for the sample project and close all opened files. <br> <br/>
+
Purpose: This suite checks if a dialog shows up when user attempts to close a modified file<br/>
# {{testcase|Close a modified file (Save)}}
# {{testcase|Close a modified file (Save)}}
## Open <tt> OpenFile.java </tt> and modify it
## Open <tt> OpenFile.java </tt> and modify it
Line 188: Line 180:
## Close file with the '''X''' on editor's tab
## Close file with the '''X''' on editor's tab
## Confirm your changes by clicking '''Save'''
## Confirm your changes by clicking '''Save'''
-
#* {{result|EXPECTED RESULT: <br>- Modify flag must show up after you modify a file.<br>- A dialog asking for confirmation must show up after the fourth step.<br>- The file must be saved (check it on hard disk) and editor tab must be closed. }}
+
#* {{result|EXPECTED RESULT:       <br>- Modify flag must show up after you modify a file.<br>- A dialog asking for confirmation must show up after the fourth step.<br>- The file must be saved (check it on hard disk) and editor tab must be closed.       }}
# {{testcase|Close a modified file (Discard)}}
# {{testcase|Close a modified file (Discard)}}
## Open <tt> OpenFile.java </tt> and modify it
## Open <tt> OpenFile.java </tt> and modify it
## Close the sample file using '''Ctrl+W''' shortcut
## Close the sample file using '''Ctrl+W''' shortcut
## Choose '''Discard''' in the dialog to discard your changes
## Choose '''Discard''' in the dialog to discard your changes
-
#* {{result|EXPECTED RESULT: <br>- Editor tab should be closed.<br>- All changes are lost (check the file on hard disk) }}
+
#* {{result|EXPECTED RESULT:       <br>- Editor tab should be closed.<br>- All changes are lost (check the file on hard disk)       }}
# {{testcase|Close a modified file (Cancel)}}
# {{testcase|Close a modified file (Cancel)}}
## Open <tt> OpenFile.java </tt> and modify it
## Open <tt> OpenFile.java </tt> and modify it
## Close the sample file using main menu action '''Window|Close Window'''
## Close the sample file using main menu action '''Window|Close Window'''
## Choose '''Cancel'''
## Choose '''Cancel'''
-
#* {{result|EXPECTED RESULT: <br>- Nothing happens - a file remains opened and it is not saved<br>- A star next to file name must remain in editor tab }}
+
#* {{result|EXPECTED RESULT: <br>- Nothing happens - a file remains opened and it is not saved<br>- A bold font must remain in editor tab   }}
-
# {{testcase|Persistence of opened files}}
+
-
## Open several classes from the project
+
-
## Try to remember which files are opened
+
-
## Close IDE
+
-
## Start IDE
+
-
#* {{result|EXPECTED RESULT: <br>- Files that were opened before closing IDE are opened in the editor after IDE restart<br>- The projects that were opened are reopened as well, but their nodes are collapsed (because of performance) }}
+
====Test suite: Read-Only Files====
====Test suite: Read-Only Files====
 +
<!-- minutes: 3 -->
# {{testcase|Open read-only file}}
# {{testcase|Open read-only file}}
## Open a read-only file in editor
## Open a read-only file in editor
## Try to type some characters inside
## Try to type some characters inside
-
#* {{result|EXPECTED RESULT: <br>- It is not possible to make any changes in read-only file<br>- Read-only status is indicated by italics font in the editor's tab }}
+
#* {{result|EXPECTED RESULT:       <br>- It is not possible to make any changes in read-only file<br>- Read-only status is indicated by italics font in the editor's tab       }}
# {{testcase|Make file read only}}
# {{testcase|Make file read only}}
## Open any read/write file in editor
## Open any read/write file in editor
Line 216: Line 203:
## Make file read only (outside IDE)
## Make file read only (outside IDE)
## Save file
## Save file
-
#* {{result|EXPECTED RESULT: Saving should not be possible, a warning should be displayed, telling the user that the file has become read only. }}
+
#* {{result|EXPECTED RESULT: Saving should not be possible, a warning should be displayed, telling the user that the file has become read only.       }}
-
# {{testcase|Read only file from JDK}}
+
-
## Open JDK class (you can use "Go To Type" dialog)
+
-
#* {{result|EXPECTED RESULT:  JDK class is read-only and no change can be done in the file }}
+
====Test suite: Tab Focus====
====Test suite: Tab Focus====
 +
<!-- minutes: 2 -->
# {{testcase|Switching editor tabs}}
# {{testcase|Switching editor tabs}}
## Open two Java source files in editor and focus one of them (move mouse cursor to editor pane and click)
## Open two Java source files in editor and focus one of them (move mouse cursor to editor pane and click)
Line 227: Line 212:
## Use next tab action ('''Ctrl+PgUp/PgDown''') to switch to next file
## Use next tab action ('''Ctrl+PgUp/PgDown''') to switch to next file
## Use '''Ctrl+Tab''' to switch to next file
## Use '''Ctrl+Tab''' to switch to next file
-
#* {{result|EXPECTED RESULT: Tabs should be switched intuitively and focus should remain in editor window. }}
+
#* {{result|EXPECTED RESULT: Tabs should be switched intuitively and focus should remain in editor window.       }}
-
# {{testcase|Closing editor tabs}}
+
-
## Open at least two java files in the Editor Window
+
-
## Close one of them (using '''Ctrl+F4''')
+
-
#* {{result|EXPECTED RESULT:  Focus should be moved to another opened Editor tab.  }}
+
====Test suite: Performance After Startup====
====Test suite: Performance After Startup====
-
Purpose: Test speed and issues caused by IDE initialization. <br><br/>
+
<!-- minutes: 5 -->
-
Setup: Start these tests '''immediately''' after main window is opened<br><br/>
+
Purpose: Test speed and issues caused by IDE initialization. <br/>
 +
Setup: Start these tests '''immediately''' after main window is opened<br/>
# {{testcase|Open File After Startup}}
# {{testcase|Open File After Startup}}
## Start the IDE
## Start the IDE
## Open file (just a file, not a project) <tt> OpenFile.java </tt> from the sample project in IDE (use "File|Open File" from the main menu)
## Open file (just a file, not a project) <tt> OpenFile.java </tt> from the sample project in IDE (use "File|Open File" from the main menu)
## Close the file
## Close the file
-
#* {{result|EXPECTED RESULT: Editor should be opened within a reasonable time. It should be less than 3 sec. on usual workstation. }}
+
#* {{result|EXPECTED RESULT: Editor should be opened within a reasonable time. It should be less than 3 sec. on usual workstation.       }}
# {{testcase|Open Project}}
# {{testcase|Open Project}}
## Start IDE with a fresh userdir
## Start IDE with a fresh userdir
Line 246: Line 228:
## Open file <tt> OpenFile.java </tt>
## Open file <tt> OpenFile.java </tt>
## Wait until file is opened, wait until scanning is finished (you can see the progress in right-bottom corner of IDE)
## Wait until file is opened, wait until scanning is finished (you can see the progress in right-bottom corner of IDE)
-
#* {{result|EXPECTED RESULT: <br>- The selected project is opened in reasonable time.<br>- Scanning is started immediately after opening the project and should be performed in reasonable time.<br>- If IDE was installed from zip the JDK classes are scanned as well.<br>- The file can be edited when opened, syntax coloring for all elements is shown in reasonable time. }}
+
#* {{result|EXPECTED RESULT:       <br>- The selected project is opened in reasonable time.<br>- Scanning is started immediately after opening the project and should be performed in reasonable time.(runs on background)<br>. The file can be edited when opened, syntax coloring for all elements is shown in reasonable time (after scan is finished).       }}
-
# {{testcase|Open Editing Options After Startup}}
+
-
## Start the IDE
+
-
## Try to open Java editor options from '''Tools|Options|Editor|Formatting''' immediately after startup
+
-
## Switch tabs in Editor's options
+
-
#* {{result|EXPECTED RESULT:  Options should be opened in reasonable time. Tabs should be switched in acceptable time. }}
+
====Test suite: Performance when working with long files====
====Test suite: Performance when working with long files====
-
Purpose: Tests speed of editing long files in editor <br><br/>
+
<!-- minutes: 4 -->
-
Setup: Prepare bigger file (PerformanceBigJava.java from sample project).<br> <br/>
+
Purpose: Tests speed of editing long files in editor<br/>
# {{testcase|Open Long Java File}}
# {{testcase|Open Long Java File}}
-
## Open big java file in editor (e.g. from main menu : File|Open File)
+
## Open big java file (performanceBig.java) in editor (e.g. from main menu : File|Open File)
## Wait for the file to be opened
## Wait for the file to be opened
## Close the file
## Close the file
## Open it again and keep it opened
## Open it again and keep it opened
-
#* {{result|EXPECTED RESULT: Time of opening/closing file should be acceptable }}
+
#* {{result|EXPECTED RESULT: Time of opening/closing file should be acceptable       }}
# {{testcase|Working With Long Java File - No comments}}
# {{testcase|Working With Long Java File - No comments}}
## Use the same file from previous case, open it if it is not opened
## Use the same file from previous case, open it if it is not opened
Line 267: Line 244:
## Add Javadoc comment before the method "newMethod" - type e.g. /** My first javadoc comment */
## Add Javadoc comment before the method "newMethod" - type e.g. /** My first javadoc comment */
## Test the speed of Enter key inside JavaDoc - press Enter when caret is just after "/**" that you typed in the previous step
## Test the speed of Enter key inside JavaDoc - press Enter when caret is just after "/**" that you typed in the previous step
-
#* {{result|EXPECTED RESULT: All actions should be done in acceptable time. }}
+
#* {{result|EXPECTED RESULT: All actions should be done in acceptable time.       }}
# {{testcase|Working With Long Java File - No Errors}}
# {{testcase|Working With Long Java File - No Errors}}
## Switch to the big java file (should be opened in editor from previous case)
## Switch to the big java file (should be opened in editor from previous case)
Line 276: Line 253:
## Go to the beginning of document ('''Ctrl+Home''')
## Go to the beginning of document ('''Ctrl+Home''')
## Scroll the editor window - hold '''Ctrl+Up/Down''' longer then 4 seconds
## Scroll the editor window - hold '''Ctrl+Up/Down''' longer then 4 seconds
-
#* {{result|EXPECTED RESULT: All actions should be completed in a very short time }}
+
#* {{result|EXPECTED RESULT: All actions should be completed in a very short time       }}
# {{testcase|Working With Long Java File - Errors}}
# {{testcase|Working With Long Java File - Errors}}
## Switch to the java file (should be opened in editor from previous case)
## Switch to the java file (should be opened in editor from previous case)
Line 284: Line 261:
## Scroll to the editor window - press '''Ctrl+Up/Down''' longer then 4 seconds
## Scroll to the editor window - press '''Ctrl+Up/Down''' longer then 4 seconds
## Type new field to body of a class - type "Integer myInt2 = new Integer(10);"
## Type new field to body of a class - type "Integer myInt2 = new Integer(10);"
-
#* {{result|EXPECTED RESULT: All actions should be completed in a short time, errors should show up in editor almost instantly. }}
+
#* {{result|EXPECTED RESULT: All actions should be completed in a short time, errors should show up in editor almost instantly.       }}
-
# {{testcase|Multiple Cloned Windows}}
+
-
## Switch to the big java file (should be opened in editor from previous case)
+
-
## Show popup menu over editor's tab and choose '''Clone Document''' item
+
-
## Undock the cloned document and dock it to the bottom of IDE, so that you create a "fake split view"
+
-
## Type some characters into original editor window
+
-
## Save file ('''Ctrl+S''')
+
-
## Type some characters into cloned editor window
+
-
## Save file ('''Ctrl+S''')
+
-
#* {{result|EXPECTED RESULT: <br>- All cloned windows should have the same content as the original editor window.<br>- Characters should appear in both original and cloned windows when typing<br>- A flag indicating modified file is present in both tabs. }}
+
====Test suite: Internationalization====
====Test suite: Internationalization====
-
Purpose: Checks editor's support for national characters. <br><br/>
+
<!-- minutes: 2 -->
-
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'''<br><br/>
+
Purpose: Checks editor's support for national characters<br/>
 +
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'''<br/>
# {{testcase|National keyboards}}
# {{testcase|National keyboards}}
## Create a new Java file ('''File|New File...''')
## Create a new Java file ('''File|New File...''')
## Switch to a keyboard layout that is different from English (e.g. to Czech or German)
## Switch to a keyboard layout that is different from English (e.g. to Czech or German)
## Type some non-English characters in the editor
## Type some non-English characters in the editor
-
#* {{result|EXPECTED RESULT: All characters in chosen language should be displayed properly. }}
+
## Save and close the file
 +
## Open the file again
 +
#* {{result|EXPECTED RESULT: All characters in chosen language should be displayed properly.       }}
# {{testcase|I18N undo action}}
# {{testcase|I18N undo action}}
## Select part of the text with national characters and invoke '''Cut''' action ('''Ctrl+X''').
## Select part of the text with national characters and invoke '''Cut''' action ('''Ctrl+X''').
## Try to invoke the '''Undo''' action ('''Ctrl+Z''').
## Try to invoke the '''Undo''' action ('''Ctrl+Z''').
-
#* {{result|EXPECTED RESULT: All changes should be correctly undone. }}
+
#* {{result|EXPECTED RESULT: All changes should be correctly undone.       }}
-
# {{testcase|Clipboard with localized characters}}
+
-
## Copy any localized string from other application.
+
-
## Paste this string into IDE's editor.
+
-
## Copy the localized string in the IDE.
+
-
## Paste it back to the other application.
+
-
#* {{result|EXPECTED RESULT:  Text should be properly copied and displayed.  }}
+
====Test suite: Line Endings====
====Test suite: Line Endings====
-
Setup: Use a [[File:sampleEditorFiles_TS_68_JavaEditorFiles.zip sample project]]<br><br/>
+
<!-- minutes: 5 -->
# {{testcase|Line endings - new files}}
# {{testcase|Line endings - new files}}
## Create new Java file
## Create new Java file
-
#* {{result|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). }}
+
#* {{result|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' }}
# {{testcase|Line endings - existing Java files}}
# {{testcase|Line endings - existing Java files}}
## Open a file with Unix EOL's (<tt>NewCanvasActionUnix.java</tt> under <tt>test.eols</tt> package)
## Open a file with Unix EOL's (<tt>NewCanvasActionUnix.java</tt> under <tt>test.eols</tt> package)
Line 327: Line 292:
## Type some new lines
## Type some new lines
## Save files
## Save files
-
#* {{result|EXPECTED RESULT: Check line endings in any binary editor for all files. The type of line endings must be preserved }}
+
#* {{result|EXPECTED RESULT: Check line endings in any binary editor for all files. The type of line endings must be preserved       }}
-
# {{testcase|Manipulating file with not native EOL}}
+
-
## Open java file with non native EOL (example: If you use Windows, then open file with Unix line endings)
+
-
## Try to manipulate this file - move from package to package, copy, use hints and code templates to generate code
+
-
#* {{result|EXPECTED RESULT:  Line endings are not changed, the code is not corrupted by any action.  }}
+
====Test suite: Using Clipboard====
====Test suite: Using Clipboard====
-
Purpose: To test Copy/Cut/Paste actions and interoperability with external/native editors. <br><br/>
+
<!-- minutes: 3 -->
-
Setup: You will need two java files opened in editor. <br> <br/>
+
Purpose: To test Copy/Cut/Paste actions and interoperability with external/native editors.<br/>
 +
Setup: You will need two java files opened in editor.<br/>
# {{testcase|Copy/Cut data inside a single Java file}}
# {{testcase|Copy/Cut data inside a single Java file}}
## Switch to a java file in editor.
## Switch to a java file in editor.
Line 342: Line 304:
## Select another portion of text and cut it to the clipboard ('''Edit|Cut''' or '''Ctrl+X''')
## Select another portion of text and cut it to the clipboard ('''Edit|Cut''' or '''Ctrl+X''')
## Move blinking caret to another place of editor and paste data from clipboard to the source file ('''Edit|Paste''' or '''Ctrl+V''')
## Move blinking caret to another place of editor and paste data from clipboard to the source file ('''Edit|Paste''' or '''Ctrl+V''')
-
#* {{result|EXPECTED RESULT: Copied text is duplicated in editor, cut text is removed, texts are placed in caret position. Caret should be behind pasted data. }}
+
#* {{result|EXPECTED RESULT: Copied text is duplicated in editor, cut text is removed, texts are placed in caret position. Caret should be behind pasted data.       }}
# {{testcase|Copy/Cut data between two edited files}}
# {{testcase|Copy/Cut data between two edited files}}
## Switch to the first file.
## Switch to the first file.
Line 348: Line 310:
## Switch to the second file.
## Switch to the second file.
## Paste the data from clipboard to the second file
## Paste the data from clipboard to the second file
-
#* {{result|EXPECTED RESULT: Selected text is copied (cut) from the first file to the second file. }}
+
#* {{result|EXPECTED RESULT: Selected text is copied (cut) from the first file to the second file.       }}
# {{testcase|Copy/Cut data To cloned view}}
# {{testcase|Copy/Cut data To cloned view}}
## Switch to a java file.
## Switch to a java file.
Line 355: Line 317:
## There should be auto focus on the cloned view, if no then get focus to the cloned view (click to cloned view).
## There should be auto focus on the cloned view, if no then get focus to the cloned view (click to cloned view).
## Paste data from clipboard to source file in cloned view
## Paste data from clipboard to source file in cloned view
-
#* {{result|EXPECTED RESULT: Text is correctly pasted in caret's position and both editor windows (cloned and original) contain the same data. }}
+
#* {{result|EXPECTED RESULT: Text is correctly pasted in caret's position and both editor windows (cloned and original) contain the same data.       }}
# {{testcase|Copy/Cut data from OS to Netbeans}}
# {{testcase|Copy/Cut data from OS to Netbeans}}
## Open any file in native editor which uses system clipboard
## Open any file in native editor which uses system clipboard
Line 361: Line 323:
## Focus some Netbeans Java editor tab
## Focus some Netbeans Java editor tab
## Paste text from clipboard to the edited file
## Paste text from clipboard to the edited file
-
#* {{result|EXPECTED RESULT: Selected text is copied from native editor and correctly pasted to Netbeans editor. }}
+
#* {{result|EXPECTED RESULT:       Selected text is copied from native editor and correctly pasted to Netbeans editor.       }}
# {{testcase|Copy/Cut data from Netbeans to OS}}
# {{testcase|Copy/Cut data from Netbeans to OS}}
## Switch to a file in IDE's editor
## Switch to a file in IDE's editor
Line 367: Line 329:
## Open any file in native editor which use system clipboard
## Open any file in native editor which use system clipboard
## Paste text from clipboard to a text file in native editor (depends on native editor)
## Paste text from clipboard to a text file in native editor (depends on native editor)
-
#* {{result|EXPECTED RESULT: Selected text is copied from Netbeans to native editor }}
+
#* {{result|EXPECTED RESULT:       Selected text is copied from Netbeans to native editor       }}
-
# {{testcase|Formatted vs. non-formatted paste}}
+
# {{testcase|Rectangular selection}}
-
## Open some java class in IDE
+
## Turn on rectangular selection
-
## Copy following code to the clipboard: <tt>for(i=    0; i<10;i++  ) {System.out.println("i="+i);} </tt>
+
## Select block of code
-
## Invoke '''Paste''' action using '''Ctrl+V''' inside some method
+
## Press Copy (or Cut)
-
## Press '''Ctrl+Z''' to undo previous Paste action
+
## Select another rectangular block of code as target
-
## Invoke "Paste Formatted" using '''Ctrl+Shift+V'''
+
## Press Paste
-
#* {{result|EXPECTED RESULT: <br>- When you press Ctrl+V, code is pasted in the Editor "as it is", without any shifting or reformatting.<br>- Code is pasted re-formatted and properly indented when you press Ctrl+Shift+V. }}
+
#* {{result|EXPECTED RESULT: Block of code of copied / moved to new position }}
====Test suite: Drag & Drop====
====Test suite: Drag & Drop====
-
Purpose: Tests the drag &amp; drop functionality inside NetBeans editor. <br><br/>
+
<!-- minutes: 3 -->
-
Setup: Opened any file in editor and focus should be in editor window. <br> <br/>
+
Purpose: Tests the drag &amp; drop functionality inside NetBeans editor.<br/>
 +
Setup: Opened any file in editor and focus should be in editor window.<br/>
# {{testcase|Basic test}}
# {{testcase|Basic test}}
## Select a block of code by mouse
## Select a block of code by mouse
## Drag the code and drop it to a different position in source code
## Drag the code and drop it to a different position in source code
-
#* {{result|EXPECTED RESULT: The code should be moved to the new position. }}
+
#* {{result|EXPECTED RESULT: The code should be moved to the new position.       }}
# {{testcase|Undo test}}
# {{testcase|Undo test}}
## Drag &amp; Drop a piece of code
## Drag &amp; Drop a piece of code
## Press '''Ctrl+Z'''
## Press '''Ctrl+Z'''
-
#* {{result|EXPECTED RESULT: The code should be moved and undo should return the code into it's original position. }}
+
#* {{result|EXPECTED RESULT: The code should be moved and undo should return the code into it's original position.       }}
# {{testcase|Interaction with guarded blocks}}
# {{testcase|Interaction with guarded blocks}}
## Create a new form
## Create a new form
## Try to invoke drag&amp;drop action on guarded blocks
## Try to invoke drag&amp;drop action on guarded blocks
-
#* {{result|EXPECTED RESULT: Only the code outside guarded blocks should be moved. The code inside guarded blocks is copied. }}
+
#* {{result|EXPECTED RESULT: Only the code outside guarded blocks should be moved. The code inside guarded blocks is copied.       }}
-
# {{testcase|Cursor change}}
+
-
## Try to drag &amp; drop the text inside editor and outside editor
+
-
#* {{result|EXPECTED RESULT:  The cursor should change according to whether drag &amp; drop action is available (inside editor) or not. }}
+
====Test suite: Editor's Toolbar and Line numbers====
====Test suite: Editor's Toolbar and Line numbers====
 +
<!-- minutes: 4 -->
# {{testcase|Show and hide line numbers (using gutter)}}
# {{testcase|Show and hide line numbers (using gutter)}}
## Open a file in editor.
## Open a file in editor.
Line 401: Line 362:
## Invoke popup menu above gutter
## Invoke popup menu above gutter
## Try to check/uncheck '''Show Line Numbers'''
## Try to check/uncheck '''Show Line Numbers'''
-
#* {{result|EXPECTED RESULT: <br>- Gutter must be displayed on the left side of the Editor Window<br>- Line numbers should be shown or hidden according to state of checkbox in gutter's context menu }}
+
#* {{result|EXPECTED RESULT:       <br>- Gutter must be displayed on the left side of the Editor Window<br>- Line numbers should be shown or hidden according to state of checkbox in gutter's context menu       }}
# {{testcase|Show and hide editor's toolbar (using gutter)}}
# {{testcase|Show and hide editor's toolbar (using gutter)}}
## Open a file in editor
## Open a file in editor
Line 407: Line 368:
## Invoke popup menu above gutter
## Invoke popup menu above gutter
## Try to check/uncheck '''Show Toolbar'''
## Try to check/uncheck '''Show Toolbar'''
-
#* {{result|EXPECTED RESULT: <br>- Gutter must be displayed on the left side of the Editor Window<br>- Editor's toolbar should be shown or hidden according to state of checkbox in gutter's context menu }}
+
#* {{result|EXPECTED RESULT:       <br>- Gutter must be displayed on the left side of the Editor Window<br>- Editor's toolbar should be shown or hidden according to state of checkbox in gutter's context menu       }}
# {{testcase|Show and hide line numbers (using main menu)}}
# {{testcase|Show and hide line numbers (using main menu)}}
## Open Java file in editor
## Open Java file in editor
## Try to show/hide line numbers using main menu action '''View|Show Line Numbers'''
## Try to show/hide line numbers using main menu action '''View|Show Line Numbers'''
-
#* {{result|EXPECTED RESULT: Line numbers should be displayed and hidden according to state of checkbox state. }}
+
#* {{result|EXPECTED RESULT:       Line numbers should be displayed and hidden according to state of checkbox state.       }}
# {{testcase|Show and hide editor's toolbar (using main menu)}}
# {{testcase|Show and hide editor's toolbar (using main menu)}}
## Open Java file in editor
## Open Java file in editor
## Try to show/hide editor's toolbar using main menu action '''View|Show Editor Toolbar'''
## Try to show/hide editor's toolbar using main menu action '''View|Show Editor Toolbar'''
-
#* {{result|EXPECTED RESULT: Toolbar should be displayed and hidden according to state of checkbox state. }}
+
#* {{result|EXPECTED RESULT:       Toolbar should be displayed and hidden according to state of checkbox state.       }}
-
# {{testcase|Editor's toolbar actions}}
+
-
## Check if all action icons in editor's toolbar have tooltip and if they are enabled
+
-
## Try to invoke actions from toolbar
+
-
#* {{result|EXPECTED RESULT:  The tooltip is available for all icons in toolbar. Each icon invokes expected action. }}
+
====Test suite: Find&Replace Test====
====Test suite: Find&Replace Test====
-
Purpose: This suite tests the find dialog. <br><br/>
+
<!-- minutes: 12 -->
-
Setup: Opened any file in editor and focus should be on editor window. <br> <br/>
+
Purpose: This suite tests the search/replace bar<br/>
-
# {{testcase|Replace Dialog Open Close}}
+
# {{testcase|Open and close search bar}}
-
## Open find dialog from main menu (Alt+E|E or with mouse).
+
## Open some file
-
## Press the Esc key.
+
## Press '''Ctrl-F'''
-
## Open find dialog (Ctrl+H).
+
## Type some text info '''Search''' text field
-
## Click on the Help button and wait till help is opened.
+
## Open another file or switch editor
-
## Close help (use small cross on window).
+
## Close search button by '''x''' button
-
## Click on the Close button.
+
## Open search bar again and press '''Esc''' when focus is in search text field
-
#* {{result|EXPECTED RESULT: Dialog must be opened and then closed. The Help window must by closed, too. }}
+
#* {{result|EXPECTED RESULT: Search bar is opened and focus is transferred to '''Search''' text field.<br/>Search bar stays opened when switching editors.<br/> Esc or ''x'' button closes search bar }}
-
# {{testcase|Find Selection Repeated}}
+
# {{testcase|Simple search}}
-
## Select a piece of text, and invoke replace dialog (Ctrl+H).
+
## Open '''search.txt'''
-
## Immediately press "Find" button.
+
## Open search bar and type ''Search''
-
## Select another piece of text, invoke replace dialog (Ctrl+H).
+
## Press '''enter'''
-
## Immediately press "Find" button.
+
## Press '''Next''' button in search bar several times
-
#* {{result|EXPECTED RESULT: When replace dialog is opened, the "Find What" input line should contain selected piece of code. After pressing "Find" button, appropriate text should be found. }}
+
#* {{result|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. }}
-
# {{testcase|Replace Dialog Combo Box}}
+
# {{testcase|Search backwards}}
-
## Perform three searches (for three different words/texts).
+
## Open search.txt
-
## Invoke the replace dialog (Ctrl+H).
+
## Put cursor at the end of text
-
## The line "Find What:" is a combo box. Try to use it.
+
## Press ''Ctrl-F''' and type ''search''
-
## When you select a word from combo box, perform "Find" on it.
+
## Press '''Previous''' several times
-
#* {{result|EXPECTED RESULT: The combo box should contain all texts you were searching for. These texts should be fully functional, including searching for these texts. }}
+
#* {{result|EXPECTED RESULT: Cursor is move to last occurrence of searched text before current position }}
-
# {{testcase|No Find - Unselected All Options}}
+
# {{testcase|Match Case}}
-
## Open replace dialog.
+
## Open search.txt
-
## Unselect all checkboxes in the dialog.
+
## Press '''Ctrl-F'''
-
## Type some word which is not contained in editor (e.g. foo).
+
## Type ''Search'' and check '''Match Case'''
-
## Press the Find button.
+
## Press enter
-
#* {{result|EXPECTED RESULT: Status line of editor should have red background and should contain text 'foo' not found. }}
+
#* {{result|EXPECTED RESULT: Only occurrences with correct case are found }}
-
# {{testcase|Find - Option Match Case}}
+
# {{testcase|Whole words}}
-
## Open replace dialog (in the same file as previous case).
+
## Open search.txt
-
## Select only Match Case.
+
## Press '''Ctrl-F''' and type '''search'''
-
## Type a word which editor contains, but change case in the searched word e.g. use '''Private''' (we are searching for "private" modifier in source file) -&gt; message "Private" not found in status bar.
+
## Press enter
-
## Open the dialog anyway and type exactly the word '''private'''.
+
#* {{result|EXPECTED RESULT: Only whole words are found }}
-
## Press the Find button.
+
# {{testcase|Regular expression}}
-
#* {{result|EXPECTED RESULT: Word "private" should be found}}
+
## Open '''search.txt'''
-
# {{testcase|Find - Option Match Whole Words Only}}
+
## Press '''Ctrl-F''' and type ''.*[1-9]."
-
## Open replace dialog.
+
## Check ''Regular Expression'' check box and press ''Enter''
-
## Unselect all checkboxes.
+
#* {{result|EXPECTED RESULT: One occurrence is found. Only 4 characters are selected }}
-
## Select Match Whole Words Only.
+
# {{testcase|Highlight results}}
-
## Type word which editor contains (this word should be typed 1. from beginning of a row and separated witch space or 2. separated witch space character on both sides or 3. space in front of word and ended with end of row).
+
## Open ''search.txt''' and press ''Ctrl-F'''
-
## Press the Find button.
+
## Type ''search'' into the text field
-
#* {{result|EXPECTED RESULT: First occurrence of the word should be found so that it fulfills all three conditions from action 4. }}
+
## Toggle ''Highlight Results''
-
# {{testcase|Find - Option Highlight Search}}
+
#* {{result|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 }}
-
## Open replace dialog.
+
# {{testcase|Wrap around}}
-
## Unselect all checkboxes.
+
## Open ''search.txt'' and press ''Ctrl-F''
-
## Select only Highlight Search.
+
## type '''search''' into text field
-
## Type any word which exists in editor multiple times.
+
## toggle '''Wrap Around''' and press '''Next''' several times
-
## Press the Find button.
+
#* {{result|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 }}
-
#* {{result|EXPECTED RESULT: All occurrences of searched word should be highlighted.  }}
+
# {{testcase|Searching when search bar is closed}}
-
# {{testcase|Find - Option Incremental Search}}
+
## Open '''search.txt''' and press '''Ctrl-F'''
-
## Open replace dialog.
+
## type ''search'' into the text field and press enter
-
## Unselect all checkboxes.
+
## Close search bar
-
## Select only Incremental Search.
+
## Try '''Find Next Occurrence''', '''Find Previous Occurrence''' and '''Toggle Highlight Results''' from the editor tool bar.
-
## Type any word which exists in editor - durring typing editor tries to find strings (it is jumping to strings) and highlights them.
+
#* {{result|EXPECTED RESULT: The buttons works as expected }}
-
## Press the Find button.
+
# {{testcase|Previous searches }}
-
#* {{result|EXPECTED RESULT: Editor should jump to string which you wrote to the dialog and such strings should be highlighted. }}
+
## Open search bar
-
# {{testcase|Find - Option Backward Search}}
+
## Expand '''Search:''' combo box
-
## Open replace dialog.
+
#* {{result|EXPECTED RESULT: Combo box list contains all strings from previous searches }}
-
## Unselect all checkboxes.
+
# {{testcase|Open replace dialog}}
-
## Select only Backward Search.
+
## Open some file
-
## Type any word which contained editor, the word should be positioned in front of the cursor.
+
## Press '''Ctrl-H'''
-
## Press the Find button.
+
## Close replace bar by ''x'' button and by esc
-
#* {{result|EXPECTED RESULT: The first occurrence in backward direction should be found.  }}
+
#* {{result|EXPECTED RESULT: Replace bar is correctly opened, ''x'' button or ''esc'' closes the panel }}
-
# {{testcase|Find - Option Wrap Search}}
+
# {{testcase|Simple replace}}
-
## Open replace dialog.
+
## Open ''search.txt'' and press '''Ctrl-H'''
-
## Unselect all checkboxes.
+
## Type ''search'' to search text field, type ''replaced'' to replace with text field
-
## Select Wrap Search only.
+
## Press ''Replace''
-
## Type any word which exists in editor, all matched words should be in front of the cursor.
+
## Undo all changes
-
## Press the Find button.
+
#* {{result|EXPECTED RESULT: Next occurrence of ''search'' behind cursor position is replace with ''replaced'', Changes can be undone }}
-
#* {{result|EXPECTED RESULT: First occurrence of the searched work should be found in editor. The following messages should be displayed: "End of document reached, continuing search from beginning.". }}
+
# {{testcase|Replace All}}
-
# {{testcase|Find - Next/Previous}}
+
## Open ''search.txt'' and press '''Ctrl-H'''
-
## Open the replace dialog.
+
## Type ''search'' to search text field and ''replaced'' to replace with
-
## Unselect all checkboxes.
+
## Press ''Replace all''
-
## Type a word (the word should occur in the editor 2-3 times).
+
## Undo all changes
-
## Press the Find button.
+
#* {{result|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) }}
-
## Close find dialog. Try pressing "Find Next" (F3) and "Find Previous" (Shift+F3).
+
# {{testcase|Replace backwards}}
-
#* {{result|EXPECTED RESULT: The searched word should be found forwards and backwards from current position.  }}
+
## Open ''search.txt'' and press '''Ctrl-H'''
-
# {{testcase|Find - Selection Without Dialog}}
+
## Type ''search'' into search text field and press '''Next''' several times
-
## Select a word in editor (the word should occur in the editor 2-3 times).
+
## type ''replaced'' into replace with text field
-
## Use "Find Selection" (only shortcut Ctrl-F3, no menu). <br>  Caution: this shortcuts are mapped to system in '''Linux/KDE'''. You must change the shortcut in IDE or in OS if this is your case.
+
## check ''Replace backwards''' and press '''Replace'''
-
## Find Next (F3)
+
## Undo all changes
-
## Try search for a different word (Ctrl-F3 on different word).
+
#* {{result|EXPECTED RESULT: Last occurrence of ''search'' before current cursor position is replaced }}
-
#* {{result|EXPECTED RESULT: Each selected word must be searched.(without dialog) }}
+
# {{testcase|Preserve case}}
-
# {{testcase|Find - Search Selected Text}}
+
## Open ''search.txt'' and press ''Ctrl-H''
-
## Select several lines of text in which you will perform search.
+
## Type ''search'' into search text field, uncheck '''Match case'''
-
## Open replace dialog, The "search in selection" checkbox should be automatically checked. Search for some word which can be found in the selection.
+
## Type ''replaced'' into replace with text field
-
## Repeat the search to find all occurrences of the word in selected text.
+
## Check '"Preserve Case''' and press '''Replace All'''
-
#* {{result|EXPECTED RESULT: All occurrences of the word are found inside of the selected text. All words which are found are highlighted and status bar contains a message about successful search. If the word exists outside selection too, it is not found. }}
+
## Undo changes
-
# {{testcase|Find - Search Selected Text Negative}}
+
#* {{result|EXPECTED RESULT: All occurrences are replaced. Case is preserved, e.g. ''search'' is replaced with ''replaced'' and ''Search'' is replaced with ''Replaced'' }}
-
## Select several lines of text in which you will perform search.
+
# {{testcase|Search Selection}}
-
## Open replace dialog, check "find in selection" and try to search for several words which are not inside of the selection but exist somewhere in the source code.
+
## Open ''search.txt''
-
#* {{result|EXPECTED RESULT: None of the words outside selection should be found.  }}
+
## Select part of some word
-
# {{testcase|Find - Regular Expressions - Simple}}
+
## Press '''Ctrl-F3''' or use '''Find Selection''' from editor toolbar
-
## Open file testRegexpSimple.java from samples.
+
#* {{result|EXPECTED RESULT: All occurrences of selected text are found, cursor is moved to the first of them }}
-
## Open replace dialog, select regexp search and search for expression: <pre>[[AA | aA]][[HH | hH]][[OO | oO]][[JJ | jJ]][09]{1,3} </pre>
+
-
#* {{result|EXPECTED RESULT: There are lines in the file with "ok" on the right side. Strings on these lines should be found. Lines with "not ok" on right side should be skipped. }}
+
-
# {{testcase|Find - Regular Expressions - Complex}}
+
-
## Open file testRegexpComplex.java from samples.
+
-
## Open replace dialog, select regexp search and search for expression: a?B*c{2}[[DD | dD]]e{1,}\.F{1,2}\s[[^g | ^g]]
+
-
#* {{result|EXPECTED RESULT: There are lines in the file with "ok" on the right side. Strings on these lines should be found. Lines with "not ok" on right side should be skipped. }}
+
====Test suite: Bookmarks====
====Test suite: Bookmarks====
 +
<!-- minutes: 8 -->
Purpose: <br><br/>
Purpose: <br><br/>
Setup: Opened any file in editor <br> <br/>
Setup: Opened any file in editor <br> <br/>
# {{testcase|Adding bookmarks}}
# {{testcase|Adding bookmarks}}
## Put caret at any line in document
## Put caret at any line in document
-
## Press Ctrl-Shift-M
+
## Press '''Ctrl-Shift-M'''
## use contex menu in gutter -> Bookmarks | Toggle Bookmark
## use contex menu in gutter -> Bookmarks | Toggle Bookmark
## use button in editor toolbar (tooltip:  Toggle Bookmark)
## use button in editor toolbar (tooltip:  Toggle Bookmark)
-
#* {{result|EXPECTED RESULT: Bookmark is added to current line or is removed if there is one already }}
+
#* {{result|EXPECTED RESULT: Bookmark is added to current line or is removed if there is one already       }}
# {{testcase|Navigating among bookmarks}}
# {{testcase|Navigating among bookmarks}}
## Place several bookmarks in a file
## Place several bookmarks in a file
-
## Press Ctrl-Shift-Comma/Ctrl-Shift-Period
+
## Press '''Ctrl-Shift-Comma/Ctrl-Shift-Period'''
## Use gutter context menu - Bookmarks | Next Bookmark /  Bookmarks | Previous Bookmark
## Use gutter context menu - Bookmarks | Next Bookmark /  Bookmarks | Previous Bookmark
## Use buttons in editor toolbar
## Use buttons in editor toolbar
-
#* {{result|EXPECTED RESULT: Caret cycle through bookmarked lines   }}
+
#* {{result|EXPECTED RESULT: Caret cycle through bookmarked lines         }}
# {{testcase|Bookmark persistence }}
# {{testcase|Bookmark persistence }}
## Place several bookmarks in a file
## Place several bookmarks in a file
Line 543: Line 495:
## Close/Reopen file
## Close/Reopen file
## Restart IDE
## Restart IDE
-
#* {{result|EXPECTED RESULT: Bookmark should stay intact }}
+
#* {{result|EXPECTED RESULT: Bookmark should stay intact       }}
# {{testcase|Moving bookmark}}
# {{testcase|Moving bookmark}}
## Put bookmark in the document
## Put bookmark in the document
## Go to previous line and press enter or delete it
## Go to previous line and press enter or delete it
-
#* {{result|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) }}
+
#* {{result|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)       }}
-
# {{testcase|Remove all bookmarks}}
+
-
## Put several bookmarks in the document
+
-
## Go to options dialog - Keymap
+
-
## Select action Other | Clear Document Bookmarks and assign free shortcut to it
+
-
## In the editor call assigned shortcut
+
-
#* {{result|EXPECTED RESULT:  All bookmarks in current document are removed  }}
+
====Test suite: Go To Line====
====Test suite: Go To Line====
-
# {{testcase|Go To Line}}
+
<!-- minutes: 4 -->
-
## Open some Java source file in editor and focus it (move mouse cursor to editor pane and click).
+
# {{testcase|Go to Line}}
-
## Repeatedly invoke '''Go to line''' action ('''Ctrl+G'''), to invoked dialog write some line number and press Goto button.
+
## Open some file
-
#* {{result|EXPECTED RESULT:  Editor window should have focus after each Go to line action invocation, negative numbers are not allowed as well as zero, you cannot type non-numerical characters to the line field. }}
+
## Call Go to line from main menu '''Navigation  | Go to line "" or use shortcut '''Ctrl-G'''
 +
## Enter some value and press enter
 +
#* {{result|EXPECTED RESULT: Caret is moved to proper line of code }}
 +
# {{testcase|Go to line behind EOF}}
 +
## Call Go to Line
 +
## Enter number bigger then number of line in current file and confirm
 +
#* {{result|EXPECTED RESULT: Caret is moved at the last line of the file }}
 +
# {{testcase|Go to line - negative case}}
 +
## Open Go To Line
 +
## Try enter invalid values - character, negative or float number
 +
#* {{result|EXPECTED RESULT: Invalid value cannot by entered  }}
 +
# {{testcase|Go to line - last values}}
 +
## Call Go To Line
 +
## Check the combo box values
 +
#* {{result|EXPECTED RESULT: Combo box contains recently used values  }}
 +
# {{testcase|Go to line - Cancel}}
 +
## Call Go To Line
 +
## Press Cancel
 +
#* {{result|EXPECTED RESULT: Caret is not moved, Go To Line dialog is closed }}
====Test suite: Jump List====
====Test suite: Jump List====
 +
<!-- minutes: 5 -->
# {{testcase|Basic Jump List functionality}}
# {{testcase|Basic Jump List functionality}}
## Open several java files and perform several searches.
## Open several java files and perform several searches.
## Try to jump through the jump list by pressing '''ALT+Left''' for previous entry and '''ALT+Right''' for next entry
## Try to jump through the jump list by pressing '''ALT+Left''' for previous entry and '''ALT+Right''' for next entry
## 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)
## 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)
-
#* {{result|EXPECTED RESULT: Editor should navigate through all positions in successful searches. Watch out for performance and for side effects. }}
+
#* {{result|EXPECTED RESULT: Editor should navigate through all positions in successful searches. Watch out for performance and for side effects.       }}
-
# {{testcase|Last edited functionality}}
+
# {{testcase|Jump List - comboboxes}}
-
## Open several java files and perform several changes.
+
## Open some file
-
## Press '''Last Edit''' button several times
+
## Perform several Go To Source/Definition, among multiple files
-
#* {{result|EXPECTED RESULT: Editor should navigate through all positions where code was edited }}
+
## Open Jump List (by clicking on small black down arrow next to Go Back/ Forward button
 +
## From the list select some item and click on it
 +
#* {{result|EXPECTED RESULT: Black button open list of previous/next locations in the jump list. Clicking on item will move cursor to related position }}
 +
# {{testcase|Last edit}}
 +
## Open some file and modify it
 +
## Save it and close
 +
## Press '''Ctrl-Q''' (or use button in editor tool bar)
 +
#* {{result|EXPECTED RESULT: File is opened again and cursor is moved to position where the file was edited }}
====Test suite: Print to HTML====
====Test suite: Print to HTML====
-
Purpose:  <br><br/>
+
<!-- minutes: 5 -->
-
Setup: <br> <br/>
+
# {{testcase|Menu Print to HTML}}
# {{testcase|Menu Print to HTML}}
-
## '''Check''' main menu '''File|Print to HTML'''. <br>
+
## '''Check''' main menu '''File|Print to HTML'''.
-
#* {{result|EXPECTED RESULT: Name of menu is "Print to HTML", mnemonic is on 'H'. Enabled only when a file is selected in Explorer window. Verify this. }}
+
#* {{result|EXPECTED RESULT: Name of menu is "Print to HTML", mnemonic is on 'H'. Enabled only when a file is selected in Explorer window. }}
# {{testcase|Default values}}
# {{testcase|Default values}}
## Open a java file.
## Open a java file.
## Invoke "Print to HTML" dialog.
## Invoke "Print to HTML" dialog.
-
#* {{result|EXPECTED RESULT: Default file location is in your home directory. ( e.g. /home/pf120623/Test.java ) <br> Colors used are the same as those in Editor. It is not possible to have different colors for html printing and editor. <br> 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. <br> Option "Show line numbers" is enabled is line numbers are visible in editor. <br> Option "Open generated HTML in browser" is enabled for all time and not selected by default. }}
+
#* {{result|EXPECTED RESULT: Default file location is in your home directory. ( e.g. /home/pf120623/Test.java ) <br> Colors used are the same as those in Editor (without semantic coloring). <br> 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. <br> Option "Show line numbers" is enabled is line numbers are visible in editor. <br> Option "Open generated HTML in browser" is enabled for all time and not selected by default.       }}
# {{testcase|Select Location}}
# {{testcase|Select Location}}
## Open Print to HTML dialog.
## Open Print to HTML dialog.
## Type a path of file to text field. E.g. /tmp/test.html
## Type a path of file to text field. E.g. /tmp/test.html
-
## Click to '''[...]''' button -&gt; File chooser dialog
+
## Click to '''Browse ...''' button -&gt; File chooser dialog
## Click '''Cancel''' in file chooser dialog
## Click '''Cancel''' in file chooser dialog
-
## Click to '''[...]''' button anyway -&gt; File chooser dialog
+
## Click to '''Browse ...''' button again -&gt; File chooser dialog
## Change path. E.g. /var/tmp/test2.html and confirm file chooser dialog by '''Open'''.
## Change path. E.g. /var/tmp/test2.html and confirm file chooser dialog by '''Open'''.
## Confirm Print to HTML dialog by '''Ok''' button.
## Confirm Print to HTML dialog by '''Ok''' button.
-
#* {{result|EXPECTED RESULT: The path shouldn't be changed  after step 4. (must be /tmp/test.html)  <br> The path should be changed in step 6. There should be created new file /var/tmp/test2.html }}
+
#* {{result|EXPECTED RESULT: The path shouldn't be changed  after step 4. (must be /tmp/test.html)  <br> The path should be changed in step 6. There should be created new file /var/tmp/test2.html }}
# {{testcase|Select Only selected text}}
# {{testcase|Select Only selected text}}
## '''Select''' some rows of code in the Editor.
## '''Select''' some rows of code in the Editor.
## Open Print to HTML dialog and confirm it.
## Open Print to HTML dialog and confirm it.
-
#* {{result|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. }}
+
#* {{result|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.       }}
# {{testcase|Select Open generated HTML in browser}}
# {{testcase|Select Open generated HTML in browser}}
## Open Print to HTML dialog.
## Open Print to HTML dialog.
## Select option "'''Open generated HTML in browser'''"
## Select option "'''Open generated HTML in browser'''"
## Confirm the dialog with '''Ok''' button
## Confirm the dialog with '''Ok''' button
-
#* {{result|EXPECTED RESULT: File should be generated and opened in default HTML browser. }}
+
#* {{result|EXPECTED RESULT: File should be generated and opened in default HTML browser.       }}
-
# {{testcase|Select show line numbers}}
+
-
## Enable '''Show line numbers''' in the Editor from Options* dialog or from popup menu over the gutter.
+
-
## Open "Print to HTML" dialog and confirm it by '''Ok''' button.
+
-
#* {{result|EXPECTED RESULT:  Check generated HTML file in web browser. Line numbers must be present.  }}
+
====Test suite: Word Matching====
====Test suite: Word Matching====
-
# {{testcase|Word matching}}
+
<!-- minutes: 3 -->
-
## Type some words inside an opened file
+
# {{testcase|Previous Word}}
-
## Use a shortcut for word matching ('''Ctrl+K''', '''Ctrl+Shift+K''')
+
## Open some file
-
## Type some prefix and press mentioned shortcut
+
## Put cursor in the middle of the text
-
## Repeat this for various file types
+
## Press '''Ctrl-K''' several times
-
#* {{result|EXPECTED RESULT: <br>- It should be possible to use word matching between files of different type (on any place inside file)<br>- Word matching provides only words starting with proper prefix }}
+
#* {{result|EXPECTED RESULT: Previous word from the code is inserted at cursor position.  }}
 +
# {{testcase|Next Word}}
 +
## Repeat previous test case but press '''Ctrl-Shit-K'''
 +
#* {{result|EXPECTED RESULT: Next word from the code is inserted as cursor position }}
 +
# {{testcase|Filtered world matching}}
 +
## Open some file
 +
## Put caret at the middle of the code
 +
## Type some character, e.g. 'p'
 +
## Press '''Ctrl-K'''
 +
#* {{result|EXPECTED RESULT: Previous word beginning with 'p' is inserted at cursor position }}
====Test suite: Select Document Node in Project,Files,Favorites====
====Test suite: Select Document Node in Project,Files,Favorites====
 +
<!-- minutes: 4 -->
# {{testcase|Menu "Navigate"}}
# {{testcase|Menu "Navigate"}}
## Verify functionality for every '''Navigate|Select in ...''' main menu item:<br>
## Verify functionality for every '''Navigate|Select in ...''' main menu item:<br>
Line 620: Line 597:
## Use '''Select in Files''' command or use shortcut '''Ctrl+Shift+2'''<br>'''&rarr; the file is selected in Files'''
## Use '''Select in Files''' command or use shortcut '''Ctrl+Shift+2'''<br>'''&rarr; the file is selected in Files'''
## Use '''Select in Favorites''' command or use shortcut '''Ctrl+Shift+3'''<br>'''&rarr; the file is selected in Favorites'''
## Use '''Select in Favorites''' command or use shortcut '''Ctrl+Shift+3'''<br>'''&rarr; the file is selected in Favorites'''
-
#* {{result|EXPECTED RESULT: Node corresponding to opened editor is selected in Project/Files/Favorites view }}
+
#* {{result|EXPECTED RESULT: Node corresponding to opened editor is selected in Project/Files/Favorites view       }}
# {{testcase|Same name test - Projects view}}
# {{testcase|Same name test - Projects view}}
## Close all projects and create a new project
## Close all projects and create a new project
-
## Create files Main.java and Main.html in one package
+
## Create files '''Main.java''' and '''Main.html''' in one package
## Open Main.java and call Select in Project
## Open Main.java and call Select in Project
## Open Main.html and call Select in Project
## Open Main.html and call Select in Project
## Try to repeat previous steps
## Try to repeat previous steps
-
#* {{result|EXPECTED RESULT: The right node is always selected in Projects view }}
+
#* {{result|EXPECTED RESULT:       The right node is always selected in Projects view       }}
# {{testcase|Same name test - Files view}}
# {{testcase|Same name test - Files view}}
## Close all projects and create a new project
## Close all projects and create a new project
Line 634: Line 611:
## Open Main.html and call Select in Files
## Open Main.html and call Select in Files
## Try to repeat previous steps
## Try to repeat previous steps
-
#* {{result|EXPECTED RESULT: The right node is always selected in Files view }}
+
#* {{result|EXPECTED RESULT:       The right node is always selected in Files view       }}
-
# {{testcase|Same name test - Favorites view}}
+
-
## Close all projects and create a new project
+
-
## Create files Main.java and Main.html in one package
+
-
## Open Main.java and call Select in Favorites
+
-
## Open Main.html and call Select in Favorites
+
-
## Try to repeat previous steps
+
-
#* {{result|EXPECTED RESULT:  The right node is always selected in Favorites view }}
+
====Test suite: Change case, insert current date====
====Test suite: Change case, insert current date====
 +
<!-- minutes: 4 -->
# {{testcase|Selection to upper-case}}
# {{testcase|Selection to upper-case}}
## Open a java file in editor.
## Open a java file in editor.
## Select some text with both lower and upper case
## Select some text with both lower and upper case
## Press '''Ctrl+U U''' (Ctrl+U followed by U)
## Press '''Ctrl+U U''' (Ctrl+U followed by U)
-
#* {{result|EXPECTED RESULT: <br>- Selection should be converted to upper-case. }}
+
#* {{result|EXPECTED RESULT:       <br>- Selection should be converted to upper-case.       }}
# {{testcase|Selection to lower-case}}
# {{testcase|Selection to lower-case}}
## Open a java file in editor.
## Open a java file in editor.
## Select some text with both lower and upper case
## Select some text with both lower and upper case
## Press '''Ctrl+U L''' (Ctrl+U followed by L)
## Press '''Ctrl+U L''' (Ctrl+U followed by L)
-
#* {{result|EXPECTED RESULT: <br>- Selection should be converted to lower-case. }}
+
#* {{result|EXPECTED RESULT:       <br>- Selection should be converted to lower-case.       }}
# {{testcase|Switch case in selection}}
# {{testcase|Switch case in selection}}
## Open a java file in editor.
## Open a java file in editor.
## Select some text with both lower and upper case
## Select some text with both lower and upper case
## Press '''Ctrl+U S''' (Ctrl+U followed by S)
## Press '''Ctrl+U S''' (Ctrl+U followed by S)
-
#* {{result|EXPECTED RESULT: <br>- Selection should be converted so that letters that were originally in capitals are now in lower case and vice versa. }}
+
#* {{result|EXPECTED RESULT:       <br>- Selection should be converted so that letters that were originally in capitals are now in lower case and vice versa.       }}
-
# {{testcase|Insert current date and time}}
+
-
## Open a java file in editor
+
-
## Open '''Tools>Options>Keymap'''
+
-
## Select node '''Other>Insert Current Date and Time'''
+
-
## Assign the action a shortcut (Ctrl+Alt+M should be unused)
+
-
## Confirm Options dialog and try to invoke the action Insert Current Date and Time in editor
+
-
#* {{result|EXPECTED RESULT:  Current date and time should be inserted in the editor. }}
+
====Test suite: Show white spaces====
====Test suite: Show white spaces====
 +
<!-- minutes: 2 -->
 +
# {{testcase|Enable show not printable character}}
 +
## Open some file
 +
## Select ''View -> Show Notprintable character''
 +
#* {{result|EXPECTED RESULT:      Non-printable (space, new lines and tabs) characters are showed in all editors      }}
 +
# {{testcase|Typing not printable characters}}
 +
## Open some editor
 +
## Type space and tab
 +
## Enter new-lines
 +
#* {{result|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====
 +
<!-- minutes: 4 -->
 +
Purpose: This test suite is related to zoom in text editor.<br/>
 +
# {{testcase|Zoom in}}
 +
## Open ''Tools->Options->Keymap'' and set shortcut for ''Zoom Text In'' action
 +
## Open editor and call ''Zoom Text In'' action
 +
#* {{result|EXPECTED RESULT:    The font in editor is enlarged. Syntax coloring must stay untouched    }}
 +
# {{testcase|Zoom out}}
 +
## Open ''Tools->Options->Keymap'' and set shortcut for ''Zoom Text Out''
 +
## Open some file and call ''Zoom Text Out'' action
 +
#* {{result|EXPECTED RESULT:    Font size in actual editor is reduced.      }}
 +
 +
{{attachments|
 +
* [[Media:TS71-PlainEditor.zip]]
 +
}}

Current revision as of 15:06, 14 October 2011

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